Пример #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!");
 }
Пример #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();
 }
Пример #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!");
            }
        }
Пример #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();
            }
        }