Example #1
0
 private void Controller_Sensor2ConnectionRefused(object sender, ConnectionRefusedEventArgs 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] : Sensor 2 as {e.IP} Refused Connection{Environment.NewLine}");
         }
     });
     Sensor2IpAddress.AsyncInvoke(x =>
     {
         x.Enabled = true;
     });
 }
Example #2
0
 private void Sensor2_ConnectionRefused(object sender, ConnectionRefusedEventArgs e) => Sensor2ConnectionRefused?.Invoke(sender, e);
Example #3
0
 private void GameClient_ConnectionRefused(object sender, ConnectionRefusedEventArgs e)
 {
     MessageBox.Show("Сервер разорвал соединение. Вы можете сохранить игру.");
 }
Example #4
0
 private void InvokeConnectionRefused(object sender, ConnectionRefusedEventArgs e)
 {
     ConnectionRefused?.Invoke(sender, e);
 }