/[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

revision 33 by william, Thu Mar 7 13:57:11 2013 UTC revision 36 by william, Fri Mar 8 02:13:59 2013 UTC
# Line 33  namespace xmltv_parser Line 33  namespace xmltv_parser
33          }          }
34          private void main_Shown(object sender, EventArgs e)          private void main_Shown(object sender, EventArgs e)
35          {          {
36                //libxmltv.Core.XMLTV
37                
38          }          }
39    
40    
41          void LoadXMLTVShcedule(string schedule_xml)          void LoadXMLTVShcedule(string schedule_xml)
42          {          {
43              var xmltv_loader = XMLTV.CreateLoader(schedule_xml);              //var xmltv_loader = XMLTV.CreateLoader(schedule_xml);
44              var xmltv_parser = XMLTV.CreateParser(xmltv_loader);              //var xmltv_parser = XMLTV.CreateParser(xmltv_loader);
45              var p = XMLTV.GetParser(xmltv_parser);              //var p = XMLTV.GetParser(xmltv_parser);
46    
47              //var channel_count = p.Channels.Values.Count;              ////var channel_count = p.Channels.Values.Count;
48              //Channels = p.Channels.Values.ToList().GetRange(0, channel_count).ToList();              ////Channels = p.Channels.Values.ToList().GetRange(0, channel_count).ToList();
49              var program_count = p.Programs.Values.Count;              //var program_count = p.Programs.Values.Count;
50              var program_list = p.Programs.Values.ToList().OrderBy(s => s.Start);              //var program_list = p.Programs.Values.ToList().OrderBy(s => s.Start);
51                ////Programs = program_list(0, program_count).ToList();
52                //Programs = new List<IXMLTVProgram>(program_list.ToArray());
53    
54                IXMLTVRuntimeInstance xmltv = XMLTV.CreateInstance(schedule_xml);
55                var program_count = xmltv.Programs.Values.Count;
56                var program_list = xmltv.Programs.Values.ToList().OrderBy(s => s.Start);
57              //Programs = program_list(0, program_count).ToList();              //Programs = program_list(0, program_count).ToList();
58              Programs = new List<IXMLTVProgram>(program_list.ToArray());              Programs = new List<IXMLTVProgram>(program_list.ToArray());
59          }          }

Legend:
Removed from v.33  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.22