VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm Class Reference

A dialog to be used to let a user login to a Milestone VMS system. More...

Inheritance diagram for VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm:

Public Types

enum  ServerConfigurationEnum { MasterAndSlaves , MasterOnly , AllServersIndividually }
 Deprecated. More...
 

Public Member Functions

 DialogLoginForm (SetLoginResultDelegate setLoginResult)
 Initialize the login dialog, and set the callback method for setting the result of the entire login process.
 
 DialogLoginForm (SetLoginResultDelegate setLoginResult, Guid integrationId, string integrationName, string version, string manufacturerName)
 Initialize the login dialog, and set the callback method for setting the result of the entire login process.
 
delegate void SetLoginResultDelegate (bool connected)
 A callback method for setting how the login performed.
 
void UpdateProgress (double progress, string text)
 Call this to update the state of the progress indicator.
 

Public Attributes

ServerConfigurationEnum ServerConfiguration = ServerConfigurationEnum.AllServersIndividually
 Deprecated. Use MasterOnly instead.
 

Protected Member Functions

delegate void UpdateProgressSafe (double progress, string text)
 Will be called whenever progress is updated.
 

Properties

bool AutoLogin [get, set]
 Set this to true if you like the auto-login tick mark to be set at start.
 
bool DisableAutoLogin [get, set]
 Set this property to false, if the AutoLogin is already ticked to on, but should be ignored this time.
 
bool EnsureDomain [get, set]
 If set to true the current domain will automatically be added to the user name if no domain is provided.
 
Image LoginLogoImage [set]
 Set this Image to have your own image at top of the login dialog.
 
bool MasterOnly = true [get, set]
 If set to true the dialog will only log in to the site specified in the URI field. If set to false it will also log in to any MFA subsites. Default is true.
 

Detailed Description

A dialog to be used to let a user login to a Milestone VMS system.

If login is performed in the Program.cs file, the following code could be used:

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
DialogLoginForm loginForm = new DialogLoginForm(SetLoginResult);
loginForm.DisableAutoLogin = true; // Consider to support auto login, by setting this to false
loginForm.ServerConfigurationEnum = ServerConfigurationEnum.AllServersIndividually; // login to all servers individually (new from MIPSDK 2015)
Application.Run(loginForm);
if (Connected)
{
Application.Run(new MyMainForm());
}
}
private static bool Connected = false;
private static void SetLoginResult(bool connected)
{
Connected = connected;
}
General environment for the standalone SDK.
Definition Environment.cs:21
static void Initialize()
This method is called by the standalone application during application start to let the EnvironmentMa...
Definition Environment.cs:59
A dialog to be used to let a user login to a Milestone VMS system.
Definition DialogLoginForm.cs:49
ServerConfigurationEnum
Deprecated.
Definition DialogLoginForm.cs:70
DialogLoginForm(SetLoginResultDelegate setLoginResult)
Initialize the login dialog, and set the callback method for setting the result of the entire login p...
Definition DialogLoginForm.cs:180
Definition Environment.cs:16
Definition Environment.cs:16
Definition Environment.cs:16

Member Enumeration Documentation

◆ ServerConfigurationEnum

Deprecated.

Enumerator
MasterAndSlaves 

Add the master as one server and all slaves as recorders under the master server.

Note that some functions and features cannot be used on the slaves.

MasterOnly 

Only add the identified server.

AllServersIndividually 

Add identified server, and all slaves as individual server as well. All servers will appear on top level.

Use this option when MIP configuration is stored on each server, and needs to be retrieved.

Constructor & Destructor Documentation

◆ DialogLoginForm() [1/2]

VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.DialogLoginForm ( SetLoginResultDelegate setLoginResult)
inline

Initialize the login dialog, and set the callback method for setting the result of the entire login process.

This method is obsolete - please use DialogLoginForm(SetLoginResultDelegate, Guid, string, string, string) instead.

Parameters
setLoginResult

◆ DialogLoginForm() [2/2]

VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.DialogLoginForm ( SetLoginResultDelegate setLoginResult,
Guid integrationId,
string integrationName,
string version,
string manufacturerName )
inline

Initialize the login dialog, and set the callback method for setting the result of the entire login process.

Parameters
setLoginResult
integrationIdUnique identifier identifying the application making the request (create this once and hard-code in your application).
integrationNameName of the application
versionVersion of the application
manufacturerNameName of the manufacturer

Member Function Documentation

◆ SetLoginResultDelegate()

delegate void VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.SetLoginResultDelegate ( bool connected)

A callback method for setting how the login performed.

Parameters
connected

◆ UpdateProgress()

void VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.UpdateProgress ( double progress,
string text )
inline

Call this to update the state of the progress indicator.

Parameters
progress
text

◆ UpdateProgressSafe()

delegate void VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.UpdateProgressSafe ( double progress,
string text )
protected

Will be called whenever progress is updated.

Parameters
progress
text

Member Data Documentation

◆ ServerConfiguration

ServerConfigurationEnum VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.ServerConfiguration = ServerConfigurationEnum.AllServersIndividually

Deprecated. Use MasterOnly instead.

Property Documentation

◆ AutoLogin

bool VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.AutoLogin
getset

Set this to true if you like the auto-login tick mark to be set at start.

◆ DisableAutoLogin

bool VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.DisableAutoLogin
getset

Set this property to false, if the AutoLogin is already ticked to on, but should be ignored this time.

This property should be used when the application has already logged on automatically, and the user need to logout/login to provide new server address or credentials.

◆ EnsureDomain

bool VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.EnsureDomain
getset

If set to true the current domain will automatically be added to the user name if no domain is provided.

◆ LoginLogoImage

Image VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.LoginLogoImage
set

Set this Image to have your own image at top of the login dialog.

Ideal size is 469x62 pixels, but will be stretched to fit.

◆ MasterOnly

bool VideoOS.Platform.SDK.UI.LoginDialog.DialogLoginForm.MasterOnly = true
getset

If set to true the dialog will only log in to the site specified in the URI field. If set to false it will also log in to any MFA subsites. Default is true.