public static PowerMonitor GetInstance(TCPListenerServer sever) { if (pM == null) { pM = new PowerMonitor(sever); } return(pM); }
static void PowerMonitorCloseThread(Object obj) { PowerMonitor powerQuery = (PowerMonitor)obj; if (powerQuery != null) { powerQuery.Close(); } }
static void PowerMonitorOpenThread(Object obj) { PowerMonitor powerQuery = (PowerMonitor)obj; if (powerQuery != null) { powerQuery.Open(); } }
void InitTCPServer() { tcpListenerServer = new TCPListenerServer(); tcpListenerServer.NotifyDataEvent += TcpListenerServer_NotifyDataEvent; IPdata = new Dictionary <string, string>(); ledDataCollection = new List <string>(); powermonitor = PowerMonitor.GetInstance(tcpListenerServer); }