示例#1
0
        private void registerButton_Click(object sender, RoutedEventArgs e)
        {
            UserRegister reg = new UserRegister();

            if (reg.Register(this.nameTextBox.Text, this.passwordTextBox.Password, this.passwordVerifyTextBox.Password, this.fullNameTextBox.Text))
            {
                this.registrationStatusLabel.Content = "";
                this.DialogResult = true;
            }
            else
            {
                this.registrationStatusLabel.Content = reg.ErrorMessage;
                return;
            }
        }
示例#2
0
 public bool RegisterUser(string Name, string Email, string Password)
 {
     try
     {
         return(userRegister.Register(Name, Email, Password));
     }
     catch (InvalidCastException e)
     {
         if (e.Source != null)
         {
             Console.WriteLine("IOException source: {0}", e.Source);
         }
         throw;
     }
 }