Exemplo n.º 1
0
        //обновление списка серверов
        private void ButtonRefreshClick(object sender, EventArgs e)
        {
            (FCon.Controls["ProvButton"] as Button).Enabled = false;
            ComboBox CB = (FCon.Controls["ServCB"] as ComboBox);

            CB.Text    = "Поиск серверов...";
            CB.Enabled = false;
            Thread t = new Thread(() => DataBaseConfiguration.searchServers(FCon, CB, (FCon.Controls["ProvButton"] as Button)));

            t.Start();
        }
Exemplo n.º 2
0
        //кнопка проверки
        private void ProvLogin(object sender, EventArgs e)
        {
            DataBaseConfiguration.connect = true;
            Enab();
            (FCon.Controls["ConnectButton"] as Button).Enabled = false;

            ComboBox CB  = (FCon.Controls["BDCB"] as ComboBox);
            string   cds = (FCon.Controls["ServCB"] as ComboBox).Text;
            string   cui = (FCon.Controls["LoginTextBox"] as TextBox).Text;
            string   cpw = (FCon.Controls["PassTextBox"] as MaskedTextBox).Text;

            CB.Enabled = false;
            CB.Text    = "Поиск...";
            Thread t = new Thread(() => DataBaseConfiguration.SearchBases(FCon, CB, (FCon.Controls["ConnectButton"] as Button), cds, cui, cpw));

            t.Start();
        }