private static void StateChangeDeleteAdd(int devhandle, string ip, StateChangedEventHandler onDeviceStateChangedEvent) { DevStateChangeDeleteInfo item = new DevStateChangeDeleteInfo { devHandle = devhandle, ip = ip, OnDeviceStateChangedEvent = onDeviceStateChangedEvent }; lsDevStateChangeDeleteInfo.Add(item); }
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); }
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); }