public SendTwoFactorCodeViewModel(
     ProxyTokenAuthControllerService proxyTokenAuthControllerService,
     IAccountService accountService)
 {
     _proxyTokenAuthControllerService = proxyTokenAuthControllerService;
     _accountService         = accountService;
     _twoFactorAuthProviders = new List <string>();
 }
예제 #2
0
        public SendTwoFactorCodeViewModel(IHostDialogService dialog,
                                          ProxyTokenAuthControllerService proxyTokenAuthControllerService,
                                          IAccountService accountService)
        {
            this.dialog = dialog;
            _proxyTokenAuthControllerService = proxyTokenAuthControllerService;
            _accountService         = accountService;
            _twoFactorAuthProviders = new List <string>();

            SendSecurityCodeCommand = new DelegateCommand(SendSecurityCodeAsync);
        }
예제 #3
0
        public LoginViewModel(
            ProxyTokenAuthControllerService proxyTokenAuthControllerService,
            IAccountAppService accountAppService,
            IApplicationContext applicationContext,
            IDataStorageManager dataStorageManager,
            IAccountService accountService,
            INavigationService navigationService,
            IFacebookService facebookManager,
            IGoogleService googleManager)
        {
            _proxyTokenAuthControllerService = proxyTokenAuthControllerService;
            _accountAppService  = accountAppService;
            _applicationContext = applicationContext;
            _dataStorageManager = dataStorageManager;
            _accountService     = accountService;
            _navigationService  = navigationService;
            _facebookManager    = facebookManager;
            _googleManager      = googleManager;

            this.GoogleLoginCommand  = new Command(this.GoogleLogin);
            this.GoogleLogoutCommand = new Command(this.GoogleLogout);

            FacebookLoginCommand       = new Command(async() => await this.FacebookLoginAsync());
            this.FacebookLogoutCommand = new Command(this.FacebookLogout);

            if (_applicationContext?.Configuration != null)
            {
                _languages        = new ObservableRangeCollection <LanguageInfo>(_applicationContext?.Configuration?.Localization?.Languages);
                _selectedLanguage = _languages?.FirstOrDefault(l => l.Name == _applicationContext?.CurrentLanguage?.Name);
            }
            _isInitialized     = false;
            _isPasswordHide    = true;
            ShowHideTapCommand = new Command(() =>
            {
                IsPasswordHide = !IsPasswordHide;
            });
        }