C# Class ERP.LoginUI.RegistrationForm

Inheritance: System.Windows.Controls.StackPanel
显示文件 Open project: arthurgfonseca/ERP-Grupo5 Class Usage Examples

Public Methods

Method Description
RegistrationForm ( ) : System

Creates a new RegistrationForm instance.

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.

CreateComboBoxWithSecurityQuestions ( ) : ComboBox

Returns a ComboBox object whose ComboBox.ItemsSource property is initialized with the resource strings defined in SecurityQuestions.

InitializeComponent ( ) : void
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. On the unexpected event that this operation failed (the user was just added so why wouldn't it be authenticated successfully) an ErrorWindow is created and 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.

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

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