public UserLoginDialogViewModel(IAuthenticationService authenticationService,
     IPasswordSupplier passwordSupplier
     ) : base()
 {
     if (authenticationService == null)
     {
         throw new ArgumentNullException("authenticationService");
     }
     if (passwordSupplier == null)
     {
         throw new ArgumentNullException("passwordSupplier");
     }
     _authenticationService = authenticationService;
     _passwordSupplier = passwordSupplier;
 }
Пример #2
0
        public MainWindowVM(IView iView, IPasswordSupplier ipasswordSupplier) : base()
        {
            try
            {
                view             = iView;
                passwordSupplier = ipasswordSupplier;
                _serializeUser   = new SerializeUserToRegistry();

                IsLoginProgress = true;

                var userLogin = TryGetUser();

                if (!string.IsNullOrEmpty(userLogin))
                {
                    InitLogin(userLogin);
                }
                else
                {
                    IsLoginProgress = false;
                }

                //IsLoginProgress = false;
                IsRegisterProgress = false;

                IsSignUpVisible   = true;
                IsRegisterVisible = false;
            }
            catch (Exception)
            {
            }

            //IsLoginProgress = false;
            IsRegisterProgress = false;

            IsSignUpVisible   = true;
            IsRegisterVisible = false;
        }