/[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/10 17:10:47	117
+++ trunk/xmltv_parser/main.cs	2013/03/10 17:41:52	118
@@ -154,6 +154,8 @@
             //    Programs = new List<IXMLTVProgram>(program_list.ToArray());
             //}
             //CreateControls();
+
+            CreateControls();
         }
 
 
@@ -210,6 +212,8 @@
             //}
 
             //lstPrograms.Items.AddRange(items.ToArray());
+
+
         }
 
         private void mnuItemOpenXMLTVFile_Click(object sender, EventArgs e)
@@ -232,14 +236,8 @@
 
         private void DeserializeDataFromFile(object filename)
         {
-            if (filename == null) { throw new ArgumentNullException("filename", "cannot be null"); }            
-            
-            if (!XMLTV.Load(filename.ToString()))
-            {
-                MessageBox.Show("Failed to load data - check log", "Failed to load data", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                return;
-            }
-            MessageBox.Show("Successfully loaded data", "Successfully loaded data", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            if (filename == null) { throw new ArgumentNullException("filename", "cannot be null"); }
+            XMLTV.Load(filename.ToString(), new EventHandler<EventArgs>(XMLTV_OnInstanceCreated));
         }
 
         private void mnuItemOpenSavedData_Click(object sender, EventArgs e)
@@ -259,12 +257,7 @@
         private void DeserializeDataToFile(object filename)
         {
             if (filename == null) { throw new ArgumentNullException("filename", "cannot be null"); }
-            if (!XMLTV.Save(filename.ToString()))
-            {
-                MessageBox.Show("Failed to save data - check log", "Failed to save data", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                return;
-            }
-            MessageBox.Show("Successfully saved data", "Successfully saved data", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            XMLTV.Save(filename.ToString());
         }
         private void mnuItemSaveData_Click(object sender, EventArgs e)
         {

 

  ViewVC Help
Powered by ViewVC 1.1.22