Exemplo n.º 1
0
 private void Controller_Robot2Disconnected(object sender, Core.Network.DisconnectEventArgs e)
 {
     Robot2Status.AsyncInvoke(x =>
     {
         x.BackColor = Color.OrangeRed;
     });
     LogConsole.AsyncInvoke(x =>
     {
         if (!x.IsDisposed)
         {
             x.AppendText($"[{DateTime.Now}][NETWORK] : Robot 2 as {e.IP} Disconnected{Environment.NewLine}");
         }
     });
 }
Exemplo n.º 2
0
 private void Controller_Sensor2Disconnected(object sender, Core.Network.DisconnectEventArgs e)
 {
     Sensor2Status.AsyncInvoke(x =>
     {
         x.BackColor = Color.OrangeRed;
     });
     Sensor2ConnectionStatus.AsyncInvoke(x =>
     {
         x.BackColor = Color.OrangeRed;
         x.Text      = "Connection Failed";
     });
     LogConsole.AsyncInvoke(x =>
     {
         if (!x.IsDisposed)
         {
             x.AppendText($"[{DateTime.Now}][NETWORK] : Disconnected From Sensor 2 as {e.IP}{Environment.NewLine}");
         }
     });
     Sensor2IpAddress.AsyncInvoke(x =>
     {
         x.Enabled = true;
     });
 }