/[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/07 13:57:11	33
+++ trunk/xmltv_parser/main.cs	2013/03/08 02:13:59	36
@@ -33,19 +33,27 @@
         }
         private void main_Shown(object sender, EventArgs e)
         {
+            //libxmltv.Core.XMLTV
+            
         }
 
 
         void LoadXMLTVShcedule(string schedule_xml)
         {
-            var xmltv_loader = XMLTV.CreateLoader(schedule_xml);
-            var xmltv_parser = XMLTV.CreateParser(xmltv_loader);
-            var p = XMLTV.GetParser(xmltv_parser);
+            //var xmltv_loader = XMLTV.CreateLoader(schedule_xml);
+            //var xmltv_parser = XMLTV.CreateParser(xmltv_loader);
+            //var p = XMLTV.GetParser(xmltv_parser);
 
-            //var channel_count = p.Channels.Values.Count;
-            //Channels = p.Channels.Values.ToList().GetRange(0, channel_count).ToList();
-            var program_count = p.Programs.Values.Count;
-            var program_list = p.Programs.Values.ToList().OrderBy(s => s.Start);
+            ////var channel_count = p.Channels.Values.Count;
+            ////Channels = p.Channels.Values.ToList().GetRange(0, channel_count).ToList();
+            //var program_count = p.Programs.Values.Count;
+            //var program_list = p.Programs.Values.ToList().OrderBy(s => s.Start);
+            ////Programs = program_list(0, program_count).ToList();
+            //Programs = new List<IXMLTVProgram>(program_list.ToArray());
+
+            IXMLTVRuntimeInstance xmltv = XMLTV.CreateInstance(schedule_xml);
+            var program_count = xmltv.Programs.Values.Count;
+            var program_list = xmltv.Programs.Values.ToList().OrderBy(s => s.Start);
             //Programs = program_list(0, program_count).ToList();
             Programs = new List<IXMLTVProgram>(program_list.ToArray());
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22