Пример #1
0
        public new void Show()
        {
            Initialization();

            context.MainForm = this;
            registration.Close();
            authentication.Close();
            base.Show();
        }
Пример #2
0
 public void CheckIn(object sendler, EventArgs e)
 {
     if (view.Password == view.ConfirmedPassword)
     {
         if (registerService.CheckIn(view.Username, view.Password, view.ConfirmedPassword))
         {
             view.Close();
             MessageBox.Show($"User {view.Username} successfully registered.");
             view.Username          = string.Empty;
             view.Password          = string.Empty;
             view.ConfirmedPassword = string.Empty;
         }
         else
         {
             view.ShowError("A user with this name already exists");
         }
     }
     else
     {
         view.ShowError("Confirmed password does not match");
     }
 }