/[xmltv_parser]/trunk/xmltv_parser/main.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/main.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/xmltv_parser/main.cs	2013/03/09 14:33:18	87
+++ trunk/xmltv_parser/main.cs	2013/03/09 14:52:10	88
@@ -137,23 +137,21 @@
 
         void LoadXMLTVShcedule(string schedule_xml)
         {
-            //XMLTV.CreateInstance(schedule_xml, new EventHandler<CancelEventArgs>(xmltv_cancelevent));
             XMLTV.CreateInstance(schedule_xml, new EventHandler<EventArgs>(XMLTV_OnInstanceCreated));
-            //XMLTV.OnInstanceCreated += new EventHandler<EventArgs>(XMLTV_OnInstanceCreated);
         }
 
         void XMLTV_OnInstanceCreated(object sender, EventArgs e)
         {
-            //ReportProgress(0);
-            //var instance = XMLTV.GetInstance();
-            //if (instance != null)
-            //{
-            //    var program_count = instance.Programs.Count;
-            //    var program_list = instance.Programs.ToList().OrderBy(s => s.GetProperty(XMLTVConstants.Programs.ProgramStart).ToString());
-            //    //Programs = program_list(0, program_count).ToList();
-            //    Programs = new List<IXMLTVProgram>(program_list.ToArray());
-            //}
-            //CreateControls();
+            ReportProgress(0);
+            var instance = XMLTV.GetInstance();
+            if (instance != null)
+            {
+                var program_count = instance.Programs.Count;
+                var program_list = instance.Programs.ToList().OrderBy(s => s.GetProperty(XMLTVConstants.Programs.ProgramStart).ToString());
+                //Programs = program_list(0, program_count).ToList();
+                Programs = new List<IXMLTVProgram>(program_list.ToArray());
+            }
+            CreateControls();
         }
 
 

 

  ViewVC Help
Powered by ViewVC 1.1.22