public void adduser() { if (Password == ConfirmPassword) { Password = Authentication.HashPassword(ConfirmPassword); DATA.AddNewUser(this); OnUserCreated(); Stocky.UI.Enviroment.CloseWindow("NewUserVeiw"); System.Windows.MessageBox.Show("User " + UserName + " has been created."); } else { System.Windows.MessageBox.Show("Passwords do not match!"); } }