Beispiel #1
0
 private void btnConnect_Click(object sender, EventArgs e)
 {
     if ((cbAddressServer.SelectedIndex == -1) || (cbNameServer.SelectedIndex == -1) || (tbUserServer.Text == String.Empty) || (tbPasswordServer.Text == String.Empty) || (cbListDataBase.SelectedIndex == -1))
     {
         MessageBox.Show(MessageUser.AllMargin, MessageUser.TitleApp, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         Registry_Class registryData = new Registry_Class();
         registryData.SetRegistry(cbAddressServer.Text, cbNameServer.Text, cbListDataBase.Text, tbUserServer.Text, tbPasswordServer.Text);
         DBConnection.LogConnection = true;
         AuthorizationForm authorizationForm = new AuthorizationForm();
         authorizationForm.ShowDialog();
         Close();
     }
 }