예제 #1
0
        private static void checkOpenConnect()
        {
            KeyBoardCtrl keyCtrl = new KeyBoardCtrl();

            if (keyCtrl.CheckConfig(config.https, config.StoreCode))
            {
                if (getConfigOpenSocket())
                {
                    aTimePing.Enabled = false;
                    aTimePing         = null;
                }
            }
        }
예제 #2
0
 private void OnTimedEvent(Object source, System.Timers.ElapsedEventArgs e)
 {
     try
     {
         if (this.webSocket != null)
         {
             this.webSocket = null;
         }
         KeyBoardCtrl sCtrl = new KeyBoardCtrl();
         if (sCtrl.CheckConfig(config.https, config.StoreCode))
         {
             Console.WriteLine("================ OnTimedEvent Thanh Cong ===========");
             Init_WebSocket(config);
             aTimer.Enabled = false;
         }
     }
     catch
     {
         Console.WriteLine("================ OnTimedEvent ERROR SOCKET ===========");
     }
 }