C# Class RIAServiceApplication.LoginUI.RegistrationForm

Form that presents the RegistrationData and performs the registration process.
Inheritance: System.Windows.Controls.StackPanel
Show file Open project: KuduApps/RIAServicesApp

Public Methods

Method Description
RegistrationForm ( ) : System

Creates a new RegistrationForm instance.

SetInitialFocus ( ) : void

Sets focus to the user name text box.

SetParentWindow ( LoginRegistrationWindow window ) : void

Sets the parent window for the current RegistrationForm.

Private Methods

Method Description
BackToLogin_Click ( object sender, RoutedEventArgs e ) : void

Switches to the login window.

CancelButton_Click ( object sender, EventArgs e ) : void

If a registration or login operation is in progress and is cancellable, cancel it. Otherwise, close the window.

GetSecurityQuestions ( ) : IEnumerable

Returns a list of the resource strings defined in SecurityQuestions.

LoginOperation_Completed ( LoginOperation loginOperation ) : void

Completion handler for the login operation that occurs after a successful registration and login attempt. This will close the window. If the operation fails, an ErrorWindow will display the error message.

RegisterButton_Click ( object sender, RoutedEventArgs e ) : void

Submit the new registration.

RegisterForm_AutoGeneratingField ( object dataForm, System.Windows.Controls.DataFormAutoGeneratingFieldEventArgs e ) : void

Wire up the Password and PasswordConfirmation accessors as the fields get generated. Also bind the Question field to a ComboBox full of security questions, and handle the LostFocus event for the UserName TextBox.

RegistrationForm_KeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Maps Esc to the cancel button and Enter to the OK button.

RegistrationOperation_Completed ( InvokeOperation operation ) : void

Completion handler for the registration operation. If there was an error, an ErrorWindow is displayed to the user. Otherwise, this triggers a login operation that will automatically log in the just registered user.

UserNameLostFocus ( object sender, RoutedEventArgs e ) : void

The callback for when the UserName TextBox loses focus. Call into the registration data to allow logic to be processed, possibly setting the FriendlyName field.

Method Details

RegistrationForm() public method

Creates a new RegistrationForm instance.
public RegistrationForm ( ) : System
return System

SetInitialFocus() public method

Sets focus to the user name text box.
public SetInitialFocus ( ) : void
return void

SetParentWindow() public method

Sets the parent window for the current RegistrationForm.
public SetParentWindow ( LoginRegistrationWindow window ) : void
window LoginRegistrationWindow The window to use as the parent.
return void