Beispiel #1
0
 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!");
 }
Beispiel #2
0
 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();
 }
Beispiel #3
0
        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!");
            }
        }
Beispiel #4
0
        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();
            }
        }