示例#1
0
        public void PLCRemove(string plcName, string ipAddress)
        {
            var plc = new PLCItem(plcName, ipAddress, mdsClient);

            plc.Disconnection(ApplicationName, PLCServerApplicationName);

            model.ListPLCItems.Remove(plc);
        }
示例#2
0
        public void PLCAdd(string plcName, string ipAddress)
        {
            var plc = new PLCItem(plcName, ipAddress, mdsClient);

            if (plc.Connection(ApplicationName, PLCServerApplicationName))
            {
                model.ListPLCItems.Add(plc);
            }
        }
示例#3
0
        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));
        }
示例#4
0
 public void PLCDisconnect(PLCItem plc)
 {
     plc.Disconnection(ApplicationName, PLCServerApplicationName);
 }