/[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 43 by william, Fri Mar 8 03:01:48 2013 UTC revision 44 by william, Fri Mar 8 03:36:44 2013 UTC
# Line 17  namespace xmltv_parser Line 17  namespace xmltv_parser
17  {  {
18      public partial class main : Form      public partial class main : Form
19      {      {
20            private IXMLTVRuntimeInstance xmltv;
21          private bool IsUnix          private bool IsUnix
22          {          {
23              get { return System.Environment.OSVersion.Platform == PlatformID.Unix; }              get { return System.Environment.OSVersion.Platform == PlatformID.Unix; }
# Line 94  namespace xmltv_parser Line 95  namespace xmltv_parser
95              ////Programs = program_list(0, program_count).ToList();              ////Programs = program_list(0, program_count).ToList();
96              //Programs = new List<IXMLTVProgram>(program_list.ToArray());              //Programs = new List<IXMLTVProgram>(program_list.ToArray());
97    
98              IXMLTVRuntimeInstance xmltv = XMLTV.CreateInstance(schedule_xml);              xmltv = XMLTV.CreateInstance(schedule_xml);
99              var program_count = xmltv.Programs.Values.Count;              var program_count = xmltv.Programs.Values.Count;
100              var program_list = xmltv.Programs.Values.ToList().OrderBy(s => s.Start);              var program_list = xmltv.Programs.Values.ToList().OrderBy(s => s.Start);
101              //Programs = program_list(0, program_count).ToList();              //Programs = program_list(0, program_count).ToList();
# Line 164  namespace xmltv_parser Line 165  namespace xmltv_parser
165              catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); MessageBox.Show(ex.Message, "Failed to save data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }              catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); MessageBox.Show(ex.Message, "Failed to save data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
166              MessageBox.Show("Successfully saved data", "Successfully saved data", MessageBoxButtons.OK, MessageBoxIcon.Information);              MessageBox.Show("Successfully saved data", "Successfully saved data", MessageBoxButtons.OK, MessageBoxIcon.Information);
167          }          }
168    
169            private void main_FormClosing(object sender, FormClosingEventArgs e)
170            {
171                if (xmltv != null)
172                {
173                    xmltv.Dispose();
174                }
175            }
176      }      }
177  }  }
178    

Legend:
Removed from v.43  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.22