예제 #1
0
        public void _CB_Status(bool value)
        {
            try
            {
                Action Act = () =>
                {
                    checking = true;
                    switch (value)
                    {
                    case (true):
                        get_server_list     = false;
                        flatStatusBar1.Text = "Подключение установленно!";
                        ListServer.Enabled  = true;
                        Login_Form L_F = new Login_Form();
                        this.Hide();
                        L_F.Show();
                        break;

                    case (false):
                        flatStatusBar1.Text = "Отсутствует подключение! Скоро оно появится, ожидайте :-)";
                        MetroFramework.MetroMessageBox.Show(this, "Ожидайте, подключение скоро появится!", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        PoluchSpisokButton.Enabled = false;
                        _CB.List_Server           += _BU_List_Server;
                        Thread Th1 = new Thread(_CB.Get_Server_List);
                        Th1.Start();
                        break;
                    }
                };
                Invoke(Act);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
        private void PodklButton_Click(object sender, EventArgs e)
        {
            Login_Form L_F = new Login_Form();

            try
            {
                _RI = new Reg_Informat();
                _RI.Register_set(ListServer.Text, ListBase.Text, LoginTextBox.Text, PasswordTextBox.Text);
                L_F.Show();
                bunifuElipse1.Dispose();
                this.Hide();
            }
            catch (Exception ex)
            {
                MetroFramework.MetroMessageBox.Show(this, ex.Message, "Системная ошибка", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }
예제 #3
0
        private void Podkl_Serv_DestroyButton_Click(object sender, EventArgs e)
        {
            try
            {
                Reg_Informat _RI = new Reg_Informat();
                Podkl_k_BD_Form P_BD = new Podkl_k_BD_Form();
                Login_Form L_F = new Login_Form();
                _RI.Connection.Close();
                _RI.Register_Destroy();
                bunifuElipse1.Dispose();
                this.Hide();
                P_BD.Show();
                

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

        }