/[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 88 by william, Sat Mar 9 14:52:10 2013 UTC revision 90 by william, Sat Mar 9 17:42:34 2013 UTC
# Line 147  namespace xmltv_parser Line 147  namespace xmltv_parser
147              if (instance != null)              if (instance != null)
148              {              {
149                  var program_count = instance.Programs.Count;                  var program_count = instance.Programs.Count;
150                  var program_list = instance.Programs.ToList().OrderBy(s => s.GetProperty(XMLTVConstants.Programs.ProgramStart).ToString());                  var program_list = instance.Programs.ToList().OrderBy(s => s.Properties[XMLTVConstants.Programs.ProgramStart].ToString());
151                  //Programs = program_list(0, program_count).ToList();                  //Programs = program_list(0, program_count).ToList();
152                  Programs = new List<IXMLTVProgram>(program_list.ToArray());                  Programs = new List<IXMLTVProgram>(program_list.ToArray());
153              }              }
# Line 175  namespace xmltv_parser Line 175  namespace xmltv_parser
175              {              {
176                  IXMLTVChannel Channel = null;                  IXMLTVChannel Channel = null;
177                  var instance = XMLTV.GetInstance();                  var instance = XMLTV.GetInstance();
178                  var id = program.GetProperty(XMLTVConstants.Programs.ProgramChannelId).ToString();                  var id = program.Properties[XMLTVConstants.Programs.ProgramChannelId].ToString();
179                  Channel = instance.Channels.Find(m => m.Id == id);                  Channel = instance.Channels.Find(m => m.Id == id);
180                  ListViewItem li = new ListViewItem(string.Format("{0} {1}", Channel.Number, Channel.CallSign));                  ListViewItem li = new ListViewItem(string.Format("{0} {1}", Channel.Number, Channel.CallSign));
181                  li.Tag = program;                  li.Tag = program;
182                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.GetProperty(XMLTVConstants.Programs.ProgramTitle).ToString()));                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.Properties[XMLTVConstants.Programs.ProgramTitle].ToString()));
183                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.GetProperty(XMLTVConstants.Programs.ProgramSubTitle).ToString()));                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.Properties[XMLTVConstants.Programs.ProgramSubTitle].ToString()));
184                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.GetProperty(XMLTVConstants.Programs.ProgramDescription).ToString()));                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, program.Properties[XMLTVConstants.Programs.ProgramDescription].ToString()));
185                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, ((DateTime)program.GetProperty(XMLTVConstants.Programs.ProgramStart)).ToString("yyyy/MM/dd hh:mm tt")));                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, ((DateTime)program.Properties[XMLTVConstants.Programs.ProgramStart]).ToString("yyyy/MM/dd hh:mm tt")));
186                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, ((DateTime)program.GetProperty(XMLTVConstants.Programs.ProgramStop)).ToString("yyyy/MM/dd hh:mm tt")));                  li.SubItems.Add(new ListViewItem.ListViewSubItem(li, ((DateTime)program.Properties[XMLTVConstants.Programs.ProgramStop]).ToString("yyyy/MM/dd hh:mm tt")));
187                  //lstPrograms.Items.Add(li);                  //lstPrograms.Items.Add(li);
188                  items.Add(li);                  items.Add(li);
189              }              }

Legend:
Removed from v.88  
changed lines
  Added in v.90

  ViewVC Help
Powered by ViewVC 1.1.22