Преглед на файлове

Fixed threading issue in ServerConsole

frogsoftware преди 1 година
родител
ревизия
d22170991a
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      prs.server/Forms/Console/ServerConsole.cs

+ 2 - 2
prs.server/Forms/Console/ServerConsole.cs

@@ -45,11 +45,11 @@ public class ServerConsole : Console
         };
         _client.Connected += (o, args) =>
         {
-            ConsoleControl.Enabled = true;
+            Dispatcher.BeginInvoke(() => ConsoleControl.Enabled = true);
         };
         _client.Disconnected += (o, args) =>
         {
-            ConsoleControl.Enabled = false;
+            Dispatcher.BeginInvoke(() => ConsoleControl.Enabled = false);
 
             if (RefreshTimer == null)
             {