/[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/09 01:46:42	71
+++ trunk/xmltv_parser/main.cs	2013/03/09 09:29:40	72
@@ -94,15 +94,24 @@
 
         void UpdateStatus(string logmessage)
         {
+            if (this.InvokeRequired)
+            {
+                try
+                {
+                    this.Invoke((Action)(delegate { UpdateStatus(logmessage); }));
+                }
+                catch { }
+                return;
+            }
             txtStatus.Text = logmessage.Replace(System.Environment.NewLine, "");
         }
         void UpdateLogOutput(string logmessage)
         {
-            if (txtLog.InvokeRequired)
+            if (this.InvokeRequired)
             {
                 try
                 {
-                    txtLog.Invoke((Action)(delegate { UpdateLogOutput(logmessage); }));
+                    this.Invoke((Action)(delegate { UpdateLogOutput(logmessage); }));
                 }
                 catch { }
                 return;
@@ -128,8 +137,8 @@
         void LoadXMLTVShcedule(string schedule_xml)
         {
             //XMLTV.CreateInstance(schedule_xml, new EventHandler<CancelEventArgs>(xmltv_cancelevent));
-            XMLTV.CreateInstance(schedule_xml);
-            XMLTV.OnInstanceCreated += new EventHandler<EventArgs>(XMLTV_OnInstanceCreated);
+            XMLTV.CreateInstance(schedule_xml, new EventHandler<EventArgs>(XMLTV_OnInstanceCreated));
+            //XMLTV.OnInstanceCreated += new EventHandler<EventArgs>(XMLTV_OnInstanceCreated);
         }
 
         void XMLTV_OnInstanceCreated(object sender, EventArgs e)

 

  ViewVC Help
Powered by ViewVC 1.1.22