Beispiel #1
0
 public static PowerMonitor GetInstance(TCPListenerServer sever)
 {
     if (pM == null)
     {
         pM = new PowerMonitor(sever);
     }
     return(pM);
 }
Beispiel #2
0
        static void PowerMonitorCloseThread(Object obj)
        {
            PowerMonitor powerQuery = (PowerMonitor)obj;

            if (powerQuery != null)
            {
                powerQuery.Close();
            }
        }
Beispiel #3
0
        static void PowerMonitorOpenThread(Object obj)
        {
            PowerMonitor powerQuery = (PowerMonitor)obj;

            if (powerQuery != null)
            {
                powerQuery.Open();
            }
        }
Beispiel #4
0
        void InitTCPServer()
        {
            tcpListenerServer = new TCPListenerServer();
            tcpListenerServer.NotifyDataEvent += TcpListenerServer_NotifyDataEvent;

            IPdata            = new Dictionary <string, string>();
            ledDataCollection = new List <string>();

            powermonitor = PowerMonitor.GetInstance(tcpListenerServer);
        }