C# Class ERP.LoginUI.LoginForm

Form that presents the login fields and handles the login process.
Inheritance: System.Windows.Controls.StackPanel
Mostrar archivo Open project: arthurgfonseca/ERP-Grupo5 Class Usage Examples

Public Methods

Method Description
LoginForm ( ) : System

Creates a new LoginForm instance.

SetParentWindow ( LoginRegistrationWindow window ) : void

Sets the parent window for the current LoginForm.

Private Methods

Method Description
CancelButton_Click ( object sender, EventArgs e ) : void

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

LoginButton_Click ( object sender, EventArgs e ) : void

Submits the LoginOperation to the server

LoginForm_AutoGeneratingField ( object sender, System.Windows.Controls.DataFormAutoGeneratingFieldEventArgs e ) : void

Handles DataForm.AutoGeneratingField to provide the PasswordAccessor.

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

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

LoginOperation_Completed ( LoginOperation loginOperation ) : void

Completion handler for a LoginOperation. If operation succeeds, it closes the window. If it has an error, we show an ErrorWindow and mark the error as handled. If it was not canceled, but login failed, it must have been because credentials were incorrect so we add a validation error to to notify the user.

RegisterNow_Click ( object sender, RoutedEventArgs e ) : void

Switches to the registration form.

Method Details

LoginForm() public method

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

SetParentWindow() public method

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