Example #1
0
 private void btnRegistration_Click(object sender, EventArgs e)
 {
     if (tbLogIn.Text.Length != 0 && tbPassword.Text.Length != 0)
     {
         if (checksIfUserAlreadyExists(tbLogIn.Text))
         {
             MessageBox.Show("O login escolhido já existe, " +
                             "escolha outro (ou faça login, caso seja você mesmo)");
             tbLogIn.Focus();
         }
         else
         {
             RegistrationForm rf = new RegistrationForm(tbLogIn.Text, tbPassword.Text);
             this.AddOwnedForm(rf);
             rf.ShowDialog(this);
         }
     }
     else
     {
         emptyFieldsWarning();
     }
 }
 public void RegistrationFormConstructorTest()
 {
     string login = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     RegistrationForm target = new RegistrationForm(login, password);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }