void ChooseSerialPort() { FormAskPortName f = new FormAskPortName(); DialogResult dr; dr = f.ShowDialog(); if (dr == DialogResult.OK || FormAskPortName.Port == null || FormAskPortName.Port == "") InitSerialPort(); else MessageBox.Show("Nem sikerült a portváltás!"); }
void MustChooseSerialPort() { FormAskPortName f = new FormAskPortName(); DialogResult dr; do { dr = f.ShowDialog(); } while ((dr != DialogResult.OK || FormAskPortName.Port == null || FormAskPortName.Port == "") && dr != DialogResult.Cancel); if (dr == DialogResult.OK) InitSerialPort(); else Application.Exit(); }
void ChooseSerialPort() { FormAskPortName f = new FormAskPortName(); DialogResult dr; dr = f.ShowDialog(); if (dr == DialogResult.OK || FormAskPortName.Port == null || FormAskPortName.Port == "") { InitSerialPort(); } else { MessageBox.Show("Nem sikerült a portváltás!"); } }
void MustChooseSerialPort() { FormAskPortName f = new FormAskPortName(); DialogResult dr; do { dr = f.ShowDialog(); } while ((dr != DialogResult.OK || FormAskPortName.Port == null || FormAskPortName.Port == "") && dr != DialogResult.Cancel); if (dr == DialogResult.OK) { InitSerialPort(); } else { Application.Exit(); } }