Class ApplicationController
Is responsible for controlling application related actions.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation
Assembly: Sartorius.SAF.Presentation.Application.dll
Syntax
public class ApplicationController : IApplicationController
Constructors
View SourceApplicationController(IServiceFactory, CurrentUser, Boolean, IOverlayEffect)
Creates a new Instance of the ApplicationController.
Declaration
public ApplicationController(IServiceFactory serviceFactory, CurrentUser currentUser, bool userLoginDialog, IOverlayEffect overlayEffect)
Parameters
Type | Name | Description |
---|---|---|
IServiceFactory | serviceFactory | Implementation of IServiceFactory. |
CurrentUser | currentUser | Contains information about the current user. |
System.Boolean | userLoginDialog | Indicates whether the login process of the framework should be used. |
IOverlayEffect | overlayEffect | An implementation of the IOverlayEffect. |
Properties
View SourceUseSecurity
Gets a value indicating whether the application is using the security components and the login dialog should be used.
Declaration
public virtual bool UseSecurity { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
View SourceChangePwd(Action)
Starts a dialog to change password if UseLogin == true (application configuration settings)
Declaration
public void ChangePwd(Action showHelp = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action | showHelp | the action that is called when help is supported by the dialog. Defining the action means help is supported. Default is null meaning help is not supported |
HandleSessionEnding(SessionEndingCancelEventArgs)
Handle a system events of type SessionEnding
Declaration
public void HandleSessionEnding(SessionEndingCancelEventArgs sessionEvent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.SessionEndingCancelEventArgs | sessionEvent | A value that indicates a System.Windows.SessionEndingCancelEventArgs. |
HandleSessionSwitch(SessionSwitchReason)
Handle a system events of type SessionSwitch.
Declaration
public void HandleSessionSwitch(SessionSwitchReason sessionEvent)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Win32.SessionSwitchReason | sessionEvent | A value that indicates a Microsoft.Win32.SessionSwitchReason. |
InitializeApplicationLock(LockConfiguration)
Initializes lock mechanism of the application.
Declaration
public void InitializeApplicationLock(LockConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
LockConfiguration | configuration | The lock configuration. |
LockApplication(Action)
Locks the application.
Declaration
public virtual void LockApplication(Action showHelp = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action | showHelp | the action that is called when help is supported by the dialog. Defining the action means help is supported. Default is null meaning help is not supported |
Remarks
If the application is locked, only the user who locked the application can unlock it. When the lock screen is canceled, the application is closed. UI Settings are saved when the application is closed.
Login(Action)
Login method with default LoginDialogArgs
Declaration
public bool Login(Action showHelp = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action | showHelp | the action that is called when help is supported by the dialog. Defining the action means help is supported. Default is null meaning help is not supported |
Returns
Type | Description |
---|---|
System.Boolean | True if the login is successful, otherwise false. |
RestartApplication()
Restarts the application.
Declaration
public void RestartApplication()
Events
View SourceRestartingApplication
Event for restarting the application.
Declaration
public event Action RestartingApplication
Event Type
Type | Description |
---|---|
System.Action |