private void btnConnectSlave_Click(object sender, EventArgs e) { if (AccessButtonClickEvent != null) { AccessButtonClickEvent.BeginInvoke("Slave", null, null); } }
public SelectCamera(List <string> listIP) { InitializeComponent(); mListIP = listIP; if (mListIP != null && mListIP.Count > 1) { lblMasterCam.Text = "Master: " + mListIP[0]; btnConnectMaster.Enabled = true; lblSlaveCam.Text = "Slave: " + mListIP[1]; btnConnectSlave.Enabled = true; } else { if (mListIP.Count > 0) { if (AccessButtonClickEvent != null) { AccessButtonClickEvent.BeginInvoke("Master", null, null); } } else { MessageBox.Show("No sensor found!", "Warning"); AccessButtonClickEvent.BeginInvoke("Exit", null, null); this.Close(); this.Dispose(); } } }
private void btnExit_Click(object sender, EventArgs e) { if (AccessButtonClickEvent != null) { AccessButtonClickEvent.BeginInvoke("Exit", null, null); } this.Close(); this.Dispose(); }