private void PodklButton_Click(object sender, EventArgs e)
 {
     switch ((LoginTextBox.Text == "") | (PasswordTextBox.Text == "") )
     {
         case (true):
             LoginTextBox.LineIdleColor = Color.Red;
             PasswordTextBox.LineIdleColor = Color.Red;                    
             LoginTextBox.HintForeColor = Color.Red;
             PasswordTextBox.HintForeColor = Color.Red;
             PasswordTextBox.isPassword = false;                    
             break;
         case (false):
             Con_Baze _CB = new Con_Baze();
             General_Form G_F = new General_Form();
             _CB.Auntentification(LoginTextBox.Text, PasswordTextBox.Text);
             if (Program.SYACCSS == 1)
             {
                 G_F.Show();
                 this.Hide();
             }
             else
             {
                 MetroFramework.MetroMessageBox.Show(this, "Отсутствует доступ. Или введенные логин или пароль неверны!", "Авторизация", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
          break;
                    
            
     }
 }
 private void bunifuFlatButton1_Click(object sender, EventArgs e)
 {
     try
     {
         _CB             = new Con_Baze();
         _CB.List_Dbs   += _BUList_Dbs;
         Reg_Informat.DS = ListBase.Text;
         Reg_Informat.UN = LoginTextBox.Text;
         Reg_Informat.UP = PasswordTextBox.Text;
         Thread Th = new Thread(_CB.Get_Base_list);
         Th.Start();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void Podkl_k_BD_Form_Load(object sender, EventArgs e)
 {
     try
     {
         this.StartPosition = FormStartPosition.CenterScreen;
         _CB = new Con_Baze();
         PoluchSpisokButton.Enabled = false;
         ListServer.Enabled         = false;
         _CB.Status         += _CB_Status;
         flatStatusBar1.Text = "Проверка подключения";
         Thread Th1 = new Thread(_CB.Connection_State);
         Th1.Start();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }