C# Class Bloom.WebLibraryIntegration.LoginDialog

this class manages a the login process for Bloom, including signing up for new accounts. (This is a bit clumsy, but makes it easy to switch to login if the user enters a known address, or switch to signup if the user tries to log in with an unknown email. It also saves passing another object around.) Much of this logic unfortunately is or will be duplicated in the web site itself. We may at some point consider embedding a part of the web site itself in a Gecko window instead for login; but in the current state of my (JohnT's) knowledge, it was easier to do a plain C# version.
Inheritance: System.Windows.Forms.Form
Show file Open project: BloomBooks/BloomDesktop Class Usage Examples

Private Properties

Property Type Description
DoSignUp void
HaveGoodEmail bool
InitializeComponent void
Login void
RestoreToLogin void
ShowTermsOfUse void
SwitchToSignUp void
UpdateDisplay void
_emailBox_TextChanged void
_forgotLabel_LinkClicked void
_passwordBox_TextChanged void
_showPasswordCheckBox_CheckedChanged void
_showTermsOfUse_LinkClicked void

Public Methods

Method Description
IsValidEmail ( string email ) : bool
LogIn ( ) : bool

This may be called by clients to log us in using the saved settings, if any.

LoginDialog ( BloomParseClient client ) : System
SignUp ( IWin32Window owner ) : bool

Adapt the dialog to use it for signup and run it. Return true if successfully signed up (or possibly logged on with an existing account).

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnClosed ( EventArgs e ) : void
OnLoad ( EventArgs e ) : void
OnShown ( EventArgs e ) : void

Private Methods

Method Description
DoSignUp ( ) : void
HaveGoodEmail ( ) : bool
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

Login ( object sender, EventArgs e ) : void
RestoreToLogin ( ) : void
ShowTermsOfUse ( bool show ) : void
SwitchToSignUp ( ) : void
UpdateDisplay ( ) : void
_emailBox_TextChanged ( object sender, EventArgs e ) : void
_forgotLabel_LinkClicked ( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) : void
_passwordBox_TextChanged ( object sender, EventArgs e ) : void
_showPasswordCheckBox_CheckedChanged ( object sender, EventArgs e ) : void
_showTermsOfUse_LinkClicked ( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

IsValidEmail() public static method

public static IsValidEmail ( string email ) : bool
email string
return bool

LogIn() public method

This may be called by clients to log us in using the saved settings, if any.
public LogIn ( ) : bool
return bool

LoginDialog() public method

public LoginDialog ( BloomParseClient client ) : System
client BloomParseClient
return System

OnClosed() protected method

protected OnClosed ( EventArgs e ) : void
e System.EventArgs
return void

OnLoad() protected method

protected OnLoad ( EventArgs e ) : void
e System.EventArgs
return void

OnShown() protected method

protected OnShown ( EventArgs e ) : void
e System.EventArgs
return void

SignUp() public method

Adapt the dialog to use it for signup and run it. Return true if successfully signed up (or possibly logged on with an existing account).
public SignUp ( IWin32Window owner ) : bool
owner IWin32Window
return bool