private void KeepAliveThread_DoWork(object sender, DoWorkEventArgs e) { while (ConsoleAPI.GetKeepAliveStatus() && !KeepAliveThread.CancellationPending) { _wait.WaitOne(10000, false); _wait.Reset(); } lock (ConsoleAPI._lock_obj) { ConnectionParams.Instance.Status = LoginStatus.Disconncted; ConnectionParams.Instance.SessionID = string.Empty; } e.Result = KeepAliveThread.CancellationPending; }
public void LogOut() { string res = ConsoleAPI.Disconnect(); }