/[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/08 10:19:32	55
+++ trunk/xmltv_parser/main.cs	2013/03/08 12:05:33	56
@@ -65,7 +65,11 @@
         {
             if (txtLog.InvokeRequired)
             {
-                txtLog.Invoke((Action)(delegate { UpdateLogOutput(logmessage); }));
+                try
+                {
+                    txtLog.Invoke((Action)(delegate { UpdateLogOutput(logmessage); }));
+                }
+                catch { }
                 return;
             }
             txtLog.AppendText(logmessage);
@@ -161,13 +165,13 @@
                 IXMLTVRuntimeInstance xmltv = null;
                 bool status = false;
                 xmltv = XMLTV.DeSerialize(filename, out status);
+                XMLTV.CreateFromInstance(xmltv, new EventHandler<EventArgs>(XMLTV_OnInstanceCreated));
                 if (!status)
                 {
                     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);
-                CreateControls();
             }
             catch (Exception ex)
             {
@@ -218,6 +222,11 @@
             }
         }
 
+        private void mnuItemExit_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+
     }
 }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22