private void ControlTowerForm_Load(object sender, EventArgs e) { InterfaceForm interfaceForm = new InterfaceForm(); if (interfaceForm.ShowDialog() != DialogResult.OK || interfaceForm.Device == null) { Close(); return; } SetDevice(interfaceForm.Device); }
private void btInterfaceSensor_Click(object sender, EventArgs e) { Hide(); try { InterfaceForm form = new InterfaceForm(defSettings, currentTranslation); form.ShowDialog(); form.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } Show(); }
private void labelChangeExamType_Click(object sender, EventArgs e) { FormSelectExamType select = new FormSelectExamType(); if (DialogResult.Cancel == select.ShowDialog()) { return; } try { InterfaceForm form = (InterfaceForm)activeFrom; form.ReloadForm(); } catch { } LoadExamInfo(); }