private static void checkOpenConnect() { KeyBoardCtrl keyCtrl = new KeyBoardCtrl(); if (keyCtrl.CheckConfig(config.https, config.StoreCode)) { if (getConfigOpenSocket()) { aTimePing.Enabled = false; aTimePing = null; } } }
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 ==========="); } }