private void Disconnected() { if (this.disconnectB.InvokeRequired) { UsefulDelegate ud = new UsefulDelegate(Disconnected); this.Invoke(ud); } else { this.connectionStatus.ForeColor = System.Drawing.Color.Red; this.connectionStatus.Text = "Disconnected"; this.serverActive.ForeColor = System.Drawing.Color.Red; serverActive.Text = "Not Active"; statusCB.ForeColor = System.Drawing.Color.Red; statusCB.Text = "Not Ready"; c_flag = false; tb_IP.Enabled = true; tb_PSW.Enabled = true; tb_EP.Enabled = true; tb_DP.Enabled = true; this.disconnectB.Enabled = false; this.getCBB.Enabled = false; this.sendCBB.Enabled = false; this.connectB.Enabled = true; } }
private void Connected() { if (this.disconnectB.InvokeRequired) { UsefulDelegate ud = new UsefulDelegate(Connected); this.Invoke(ud); } else { this.connectionStatus.ForeColor = System.Drawing.Color.Green; this.connectionStatus.Text = "Connected"; c_flag = true; tb_IP.Enabled = false; tb_PSW.Enabled = false; tb_EP.Enabled = false; tb_DP.Enabled = false; this.disconnectB.Enabled = true; this.getCBB.Enabled = true; this.sendCBB.Enabled = true; this.connectB.Enabled = false; statusCB.ForeColor = System.Drawing.Color.Green; statusCB.Text = "Ready"; } }
public void CBGetting() { if (this.serverActive.InvokeRequired) { UsefulDelegate ud = new UsefulDelegate(CBGetting); this.Invoke(ud); } else { statusCB.ForeColor = System.Drawing.Color.Orange; statusCB.Text = "Receiving..."; } }
public void Activation() { if (this.serverActive.InvokeRequired) { UsefulDelegate ud = new UsefulDelegate(Activation); this.Invoke(ud); } else { //Console.WriteLine("Activation..."); serverActive.Text = "Active"; this.serverActive.ForeColor = System.Drawing.Color.Green; } }
public void EnableCB() { if (this.serverActive.InvokeRequired) { UsefulDelegate ud = new UsefulDelegate(EnableCB); this.Invoke(ud); } else { getCBB.Enabled = true; sendCBB.Enabled = true; statusCB.ForeColor = System.Drawing.Color.Green; statusCB.Text = "Ready"; } }
public void StartCBGetting() { if (this.serverActive.InvokeRequired) { UsefulDelegate ud = new UsefulDelegate(StartCBGetting); this.Invoke(ud); } else { sendCBB.Enabled = false; getCBB.Enabled = false; statusCB.ForeColor = System.Drawing.Color.Red; statusCB.Text = "On queue..."; } }