Esempio n. 1
0
        private void Connect(IPAddress address)
        {
            connectButton.Enabled = false;

            using (ConnectingForm form = new ConnectingForm(address))
            {
                // wenn wir verbunden sind (result == OK)
                if (!form.IsDisposed && form.ShowDialog() == DialogResult.OK)
                {
                    OpenMainForm(form.Drone); // richtiges Fenster öffnen
                }
            }

            connectButton.Enabled = true;
        }
Esempio n. 2
0
        private void Connect(IPAddress address)
        {
            connectButton.Enabled = false;

            // wenn wir verbunden sind (result == OK), können wir das Fenster schließen
            ConnectingForm form = new ConnectingForm(address);
            if (form.ShowDialog() == DialogResult.OK)
            {
                searchTimer.Stop();

                OpenMainForm(form.Drone);
            }
            form.Dispose();

            connectButton.Enabled = true;
        }
Esempio n. 3
0
        private void Connect(IPAddress address)
        {
            connectButton.Enabled = false;

            // wenn wir verbunden sind (result == OK), können wir das Fenster schließen
            ConnectingForm form = new ConnectingForm(address);

            if (form.ShowDialog() == DialogResult.OK)
            {
                searchTimer.Stop();

                OpenMainForm(form.Drone);
            }
            form.Dispose();

            connectButton.Enabled = true;
        }