/// <summary> /// Initializes a new instance of the LoginStateViewModel class. /// </summary> /// <param name="licensePageCommands">The reference to the /// license page commands object.</param> /// <param name="executeLogin">The action to be executed when login /// is requested.</param> public LoginStateViewModel( ILicensePageCommands licensePageCommands, LoginActionHandler executeLogin) { Debug.Assert(licensePageCommands != null); Debug.Assert(executeLogin != null); this.RememberCredentialCommand = new DelegateCommand( _ => _ExecuteRememberCredential(), _ => _CanLogin()); this.LoginCommand = new DelegateCommand( _ => executeLogin(this.Username, this.Password, _rememberCredential), _ => _CanLogin()); this.CreateAccountCommand = licensePageCommands.CreateAccount; this.RecoverCredentialsCommand = licensePageCommands.RecoverCredentials; }