Browse Source

multithreading bug fix

Bart Reedijk 10 years ago
parent
commit
860b9f8f31
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Proftaak Remote Healthcare/Fietsclient/MainForm.cs

+ 6 - 0
Proftaak Remote Healthcare/Fietsclient/MainForm.cs

@@ -34,6 +34,12 @@ namespace Fietsclient
 
         private void addTextToLog(string text)
         {
+            if (this.InvokeRequired)
+            {
+                this.Invoke((new Action(() => addTextToLog(text))));
+                return;
+            }
+
             textBox1.AppendText(text);
         }
     }