protected override void Connection_OnDisconnected(Core.Communication.Connection connection) { Experior.Core.Communication.TCPIP.Connection thisConnection = connection as Experior.Core.Communication.TCPIP.Connection; Experior.Core.Environment.Log.Write(DateTime.Now.ToString() + " " + this.Name + " connection dropped for ID " + thisConnection.Id + " on IP " + thisConnection.Ip.ToString() + " and port " + thisConnection.Port.ToString(), Color.Red); if (DespatchConnection.State == Core.Communication.State.Disconnected && ControllerConnection.State == Core.Communication.State.Disconnected) { DisplayText.Color = Color.Red; // PLC object text } else { DisplayText.Color = Color.Orange; // PLC object text } plcConnected = false; PLC_State = ATCPLCStates.Disconnected; }