Exemplo n.º 1
0
 public void sshConn_OnToggleConnectionStateHandler(object sender, OnConnectionStateEventArgs e)
 {
     if (e.connState == ConnectionState.Open)
     {
         this.statusStripSSH.ForeColor = Color.Green;
     }
     else if (e.connState == ConnectionState.Closed)
     {
         this.statusStripSSH.ForeColor = Color.Red;
     }
 }
Exemplo n.º 2
0
        public void charDBConn_OnToggleConnectionStateHandler(object sender, OnConnectionStateEventArgs e)
        {
            // Invoke needed since values can only be changed in the main thread
            if (this.InvokeRequired)
            {
                this.Invoke((Action <object, OnConnectionStateEventArgs>)charDBConn_OnToggleConnectionStateHandler, sender, e);
                return;
            }

            if (e.connState == ConnectionState.Open)
            {
                this.statusStripChar.ForeColor = Color.Green;
                //toolStripBtnAdd.Enabled = true;
                //toolStripBtnDelete.Enabled = true;
            }
            else if (e.connState == ConnectionState.Closed)
            {
                this.statusStripChar.ForeColor = Color.Red;
                //toolStripBtnAdd.Enabled = false;
                //toolStripBtnDelete.Enabled = false;
            }
        }
Exemplo n.º 3
0
 public void sshConn_OnToggleConnectionStateHandler(object sender, OnConnectionStateEventArgs e)
 {
     if (e.connState == ConnectionState.Open)
     {
         this.statusStripSSH.ForeColor = Color.Green;
     }
     else if (e.connState == ConnectionState.Closed)
     {
         this.statusStripSSH.ForeColor = Color.Red;
     }
 }
Exemplo n.º 4
0
        public void charDBConn_OnToggleConnectionStateHandler(object sender, OnConnectionStateEventArgs e)
        {
            // Invoke needed since values can only be changed in the main thread
            if (this.InvokeRequired)
            {
                this.Invoke((Action<object, OnConnectionStateEventArgs>)charDBConn_OnToggleConnectionStateHandler, sender, e);
                return;
            }

            if (e.connState == ConnectionState.Open)
            {
                this.statusStripChar.ForeColor = Color.Green;
                //toolStripBtnAdd.Enabled = true;
                //toolStripBtnDelete.Enabled = true;
            }
            else if (e.connState == ConnectionState.Closed)
            {
                this.statusStripChar.ForeColor = Color.Red;
                //toolStripBtnAdd.Enabled = false;
                //toolStripBtnDelete.Enabled = false;
            }
        }