/[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 119 by william, Sun Mar 10 17:43:20 2013 UTC revision 126 by william, Sun Mar 10 20:19:33 2013 UTC
# Line 26  namespace xmltv_parser Line 26  namespace xmltv_parser
26          {          {
27              InitializeComponent();              InitializeComponent();
28              ListViewSorter Sorter = new ListViewSorter();              ListViewSorter Sorter = new ListViewSorter();
29              lstPrograms.ListViewItemSorter = Sorter;              //lstPrograms.ListViewItemSorter = Sorter;
30              string log_path = Application.StartupPath;              string log_path = Application.StartupPath;
31              string log_filename = string.Format("{0}.log", typeof(main).Assembly.GetName().Name);              string log_filename = string.Format("{0}.log", typeof(main).Assembly.GetName().Name);
32              gLog.CreateLog(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));              gLog.CreateLog(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));
# Line 213  namespace xmltv_parser Line 213  namespace xmltv_parser
213    
214              //lstPrograms.Items.AddRange(items.ToArray());              //lstPrograms.Items.AddRange(items.ToArray());
215    
216                            //var source = new BindingSource();
217                //source.DataSource = XMLTV.GetPrograms();
218                //dataGrid.DataSource = source;
219    
220                object datasource = XMLTV.CreateDataSourceFromObject(XMLTV.GetPrograms());
221    
222               XMLTV.CreateSorterFromDataSource(ref datasource, "title");
223    
224                dataGrid.DataSource = datasource;
225    
226          }          }
227    
# Line 221  namespace xmltv_parser Line 229  namespace xmltv_parser
229          {          {
230              try              try
231              {              {
232                  lstPrograms.Items.Clear();                  //lstPrograms.Items.Clear();
233                  //LoadXMLTVShcedule("20130307_continuum_schedule.xml");                  //LoadXMLTVShcedule("20130307_continuum_schedule.xml");
234                  var result = xmltv_file_chooser.ShowDialog();                  var result = xmltv_file_chooser.ShowDialog();
235                  if (result != DialogResult.OK) return;                  if (result != DialogResult.OK) return;

Legend:
Removed from v.119  
changed lines
  Added in v.126

  ViewVC Help
Powered by ViewVC 1.1.22