Пример #1
0
        private static void StateChangeDeleteAdd(int devhandle, string ip, StateChangedEventHandler onDeviceStateChangedEvent)
        {
            DevStateChangeDeleteInfo item = new DevStateChangeDeleteInfo {
                devHandle = devhandle,
                ip        = ip,
                OnDeviceStateChangedEvent = onDeviceStateChangedEvent
            };

            lsDevStateChangeDeleteInfo.Add(item);
        }
Пример #2
0
        private static StateChangedEventHandler StateChangeDeleteFindDevOnDeviceStateChangedEventByIP(string ip)
        {
            DevStateChangeDeleteInfo info = null;

            info = lsDevStateChangeDeleteInfo.Find(m_DevStateChangeDeleteInfo => m_DevStateChangeDeleteInfo.ip == ip);
            if (info == null)
            {
                return(null);
            }
            return(info.OnDeviceStateChangedEvent);
        }
Пример #3
0
        private static StateChangedEventHandler StateChangeDeleteFindDevOnDeviceStateChangedEvent(int devhandle)
        {
            DevStateChangeDeleteInfo info = null;

            info = lsDevStateChangeDeleteInfo.Find(m_DevStateChangeDeleteInfo => m_DevStateChangeDeleteInfo.devHandle == devhandle);
            if (info == null)
            {
                return(null);
            }
            return(info.OnDeviceStateChangedEvent);
        }