private void disconnectButton_Click(object sender, EventArgs e) { readTimer.Stop(); messenger.Disconnect(); UpdateButtonsAndConnectionInfo(); UpdateButtonsAndConnectionInfo2(); }
private void disconnectButton_Click(object sender, EventArgs e) { // Disconnect from the Brick messenger.Disconnect(); updateFormGUI(); }
private void btnDisconnect_Click(object sender, EventArgs e) { // Disconnect from the Brick messenger.Disconnect(); isConnected = false; UpdateFormGUI(); }
private void btnConnectBouncerA_Click(object sender, EventArgs e) { if (btnConnectBouncerA.Text == "Connect") { //String port = cbbComPorts.Text.Substring(0,cbbComPorts.Text.IndexOf(' ')); String port = cbbBouncerAComs.Text; if (bouncerAMessenger.Connect(port)) { UpdateButtonsAndConnectionInfo(); lbLog.Items.Clear(); messageTimer.Start(); } else { MessageBox.Show("Failed to connect to serial port '" + port + "'.\n" + "Is your EV3 connected to that serial port? Or is it using another one?"); } } else { //messageReceiveTimer.Stop(); bouncerAMessenger.Disconnect(); UpdateButtonsAndConnectionInfo(); } }
private void Pong_FormClosed(object sender, FormClosedEventArgs e) { ev3Messenger1.Disconnect(); ev3Messenger2.Disconnect(); Form Menu = new MainMenu(); Menu.Show(); }
private void button1_Click(object sender, EventArgs e) { if (!ev3Messenger.IsConnected) { ev3Messenger.Connect(comboBox1.Text.ToUpper()); flowLayoutPanel1.BackColor = Color.Green; } else { ev3Messenger.Disconnect(); flowLayoutPanel1.BackColor = Color.Red; } }
private void dissconnectBtn_Click(object sender, EventArgs e) { messenger.Disconnect(); updateFormGUI(); }
private void disconnectButton_Click(object sender, EventArgs e) { messenger.Disconnect(); connectButton.BackColor = Color.SpringGreen; updateFormGUI(); }
public static void Disconnect() { messenger.Disconnect(); }