private void changeUserButton_Click(object sender, EventArgs e)
        {
            EnterView enterView = new EnterView();

            this.Hide();
            enterView.Show();
        }
Beispiel #2
0
 public void Register(string login,
                      string password,
                      string repeatedPassword)
 {
     if (password != repeatedPassword ||
         password == "")
     {
         throw new Exception("Incorrect password setting");
     }
     if (!data.IsLoginExist(login))
     {
         data.CreateNewUser(login, password);
         EnterView enterView = new EnterView();
         ((RegisterView)view).Hide();
         enterView.Show();
     }
     else
     {
         throw new Exception("User with entered name exists.");
     }
 }