Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
            }
        }
Пример #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
 /// <summary>
 /// Disconnessione da PLC
 /// </summary>
 /// <param name="plc">PLC da disconnettere</param>
 private void PLCDisconnect(PLCItem plc)
 {
     plc.Disconnection(ApplicationName, PLCServerApplicationName);
 }