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

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

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

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

            powermonitor = PowerMonitor.GetInstance(tcpListenerServer);
        }