BMXNET 4.0 Developer API

This class models the workflow of the LoginProcess. It correographs UI and non-UI login methods, login cancelling, management dialogs, and provides hooks (events) to customize the login workflow.

Namespace:  IndianHealthService.BMXNet.WinForm
Assembly:  BMXWIN40 (in BMXWIN40.dll)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class LoginProcess
Public Class LoginProcess
public ref class LoginProcess

Members

            
 All Members  Properties   Methods   Events  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
AttemptAccessVerifyLogin(RpmsConnectionSpec, String, String)
Attempt a headless non-interactive UI login. This would be useful for an ASP.NET or NT-service type application
AttemptingLogin
Triggered before every login attempt. See AttemptingLoginEventArgs for details .
AttemptUserInputLogin(String, Int32, Boolean, IWin32Window)
Attempt an interactive UI login. There are several useful arguments to control the process and appearance of the this process.
AttemptWindowsAuthLogin()()()
Using the current default connection spec, attempt a WindowsAuthentication Login and answer true if it was successful.
AttemptWindowsAuthLogin(RpmsConnectionSpec)
Attempt a WindowsAuthentication Login and answer true if it was successful.
AutoSetDivisionToLastLookup
If set to True, RPMS is checked and if there was a previously set division for the user it will be used, otherwise MustResolveDivision will be set to True and the division will need to be set for the user. The default is True
Cancel
During a LoginAttempted the LoginProcess can be Cancelled by setting Cancel to True.
ConnectionSpec
The active ConnectionSpec being used to login. With care, the property can be changed or the instance can be modified during the AttemptingLogin and LoginAttempted events with care.
Equals(Object) (Inherited from Object.)
FailureException
If an exception occured during the last login attempt, FailureException will be set to it.
FailureMessage
A reasonable message to display to the user if the last login attempt failed.
Finalize()()() (Inherited from Object.)
Framework
GetHashCode()()() (Inherited from Object.)
GetType()()() (Inherited from Object.)
HandleLoginAttemptedFailed()()()
Will trigger the LoginAttempted event
HasDefaultConnectionWithUseWindowsAuth
Answer True if there is a default managed connection that uses WindowsAuthenication
IsSwitchServerModeEnabled
If set to True, the Connection combo box on the Login screen with be dropped down when the dialog is displayed. This is useful for applications that have an option to change Connections. The default is False.
LoginAttempted
Triggered after every login attempt. See LoginAttemptedEventArgs for details .
LoginAttempts
The number of login attempts so far. This value can be modified during the AttemptingLogin and LoginAttempted events.
MaxAttempts
The number of login attempts before cancelling the LoginProcess. The default value is 3. This value can be modified during the AttemptingLogin and LoginAttempted events.
MemberwiseClone()()() (Inherited from Object.)
MustResolveDivision
If the division for the user has not been determine after the LoginProcess, MustResolveDivision will be set to True. The default if False.
Succeeded()()()
If the application is managing the actual login, send Succeeded() to indicate success.
ToString()()() (Inherited from Object.)
WasLoginAttempted
True if a login was attempted. False if the user is presented with a LoginDialog and "Cancel" is selected. The value is changed during every login attempt cycle.
WasSuccessful
True if the most recent login attempt was successful.

Examples

See the SDK for other examples.
Copy Code
             this.Framework = WinFramework.CreateWithNetworkBroker(true);
             this.Framework.LoadSettings(LocalPersistentStore.CreateIn(Environment.SpecialFolder.LocalApplicationData, EntryAssemblyInfo.AssemblyCompany + "/" + EntryAssemblyInfo.AssemblyProduct, false), "settings");
             this.Framework.LoadConnectionSpecs(LocalPersistentStore.CreateIn(Environment.SpecialFolder.LocalApplicationData, EntryAssemblyInfo.AssemblyCompany + "/" + EntryAssemblyInfo.AssemblyProduct, false), "connectiosn");
             LoginProcess login = this.Framework.CreateLoginProcess();
             
             //Attempt a non-UI WindowsAuth if and only if there is a default connection with WindowsAuth
             //Of course, an application can set its own policy of when to AttemptWindowsAuthLogin()
             
             if (login.HasDefaultConnectionWithUseWindowsAuth)
             {
                 login.AttemptWindowsAuthLogin();
             }
             
             //If not attempted yet, i.e. skipped the AttemptWindowsAuthLogin(), or was unsuccessul, try and UI login
             if (!login.WasLoginAttempted || !login.WasSuccessful)
             {
                 login.AttemptUserInputLogin(IndianHealthService.BMXNet.Util.EntryAssemblyInfo.AssemblyTitle+" Login", 3,!this.Framework.BootStrapSettings.Get("lockedit",false), this);
             }
                    
             //If the login process was unable to login after the max tries (or fow other configuration reasons), exit the application
             if (!login.WasSuccessful)
             {
                 this.Close();
                 return;
             }
              
             // Making sure that the user's division is set.  Can use AttemptUserInputSetDivision() or the application can devise another solution
             if ((this.Framework.User.Division == null) && !this.Framework.AttemptUserInputSetDivision("Set Initial Division", this))
             {
                 this.Close();
                 return;
             }
            
             // Logged in with valid user and division 
              this.RemoteSession = this.Framework.PrimaryRemoteSession;
             

Inheritance Hierarchy

System..::.Object
  IndianHealthService.BMXNet.WinForm..::.LoginProcess

See Also