private void CreateUser_Click(object sender, RoutedEventArgs e) { SSBServiceClient sbc = new SSBServiceClient(); sbc.CreateUserCompleted += new EventHandler <CreateUserCompletedEventArgs>(CreateUserCompleted); try { if (!string.IsNullOrEmpty(UserName.Text)) { if (Password.Password == ConfirmPass.Password) { //bugbug this service has all kinds of other methods that shouldn't be exposed like Transfer and UpdateBalance sbc.CreateUserAsync(UserName.Text, Email.Text, Password.Password); } else { SetError("The usernames you typed did not match"); } } else { SetError("Please type a username."); } } catch (Exception ex) { SetError(ex.ToString()); } }
private void CreateUser_Click(object sender, RoutedEventArgs e) { SSBServiceClient sbc = new SSBServiceClient(); sbc.CreateUserCompleted += new EventHandler<CreateUserCompletedEventArgs>(CreateUserCompleted); try { if (!string.IsNullOrEmpty(UserName.Text)) { if (Password.Password == ConfirmPass.Password) { //bugbug this service has all kinds of other methods that shouldn't be exposed like Transfer and UpdateBalance sbc.CreateUserAsync(UserName.Text, Email.Text, Password.Password); } else { SetError("The usernames you typed did not match"); } } else { SetError("Please type a username."); } } catch (Exception ex) { SetError(ex.ToString()); } }