/// <summary> /// Rimozione PLC da lista PLC /// </summary> /// <param name="plcName">Nome del plc</param> /// <param name="ipAddress">indirizzo ip del plc</param> private void PLCRemove(string plcName, string ipAddress) { var plc = new PLCItem(plcName, ipAddress, mdsClient); plc.Disconnection(ApplicationName, PLCServerApplicationName); ListPLCItems.Remove(plc); }
/// <summary> /// Aggiunta PLC a lista PLC /// </summary> /// <param name="plcName">Nome del plc</param> /// <param name="ipAddress">indirizzo ip del plc</param> private void PLCAdd(string plcName, string ipAddress) { var plc = new PLCItem(plcName, ipAddress, mdsClient); if (plc.Connection(ApplicationName, PLCServerApplicationName)) { ListPLCItems.Add(plc); } }
public bool Equals(PLCItem plc) { // If parameter is null return false: if (plc == null) { return(false); } // Return true if either fields match: return((Name == plc.Name && IPAddress == plc.IPAddress)); }
/// <summary> /// Disconnessione da PLC /// </summary> /// <param name="plc">PLC da disconnettere</param> private void PLCDisconnect(PLCItem plc) { plc.Disconnection(ApplicationName, PLCServerApplicationName); }