Example #1
0
        private void btnDisconnect_Click(object sender, EventArgs e)
        {
            if (ConnectionParams.Instance.Status != LoginStatus.Connected)
            {
                return;
            }

            Cursor.Current = Cursors.WaitCursor;

            KeepAliveThread.CancelAsync();
            _wait.Set();

            _LoginDlg.LogOut();
            UpdateStatus();

            foreach (TabPage tp in this.tcConsole.TabPages)
            {
                IRefreshable control = tp.Tag as IRefreshable;
                if (control != null)
                {
                    control.OnDisconnect();
                }
            }
            Cursor.Current = Cursors.Default;
        }
Example #2
0
 private void KeepAliveThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if ((bool)e.Result)
     {
         return;
     }
     UpdateStatus();
     MessageBox.Show("EIB Server is not responding. Please Reconnect.", "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     foreach (TabPage tp in this.tcConsole.TabPages)
     {
         IRefreshable control = tp.Tag as IRefreshable;
         if (control != null)
         {
             control.OnDisconnect();
         }
     }
 }