예제 #1
0
        public NewEmployeeRegisterWindowViewModel(IAccountApiService accountApiService, IAlpDialogService dialogService)
        {
            _accountApiService = accountApiService;
            _dialogService     = dialogService;

            CancelCommand = new RelayCommand <Window>(OnCancelCommand);
        }
예제 #2
0
        public PasswordChangeWindowViewModel(IAccountApiService accountApiService, IAlpDialogService dialogService)
        {
            _accountApiService = accountApiService;
            _dialogService     = dialogService;

            CancelCommand = new RelayCommand <Window>(OnCancelCommand);
        }
예제 #3
0
 public AccountService(
     IAccountApiService accountApiService,
     ISecureStorageService secureStorageService)
 {
     _accountApiService    = accountApiService;
     _secureStorageService = secureStorageService;
     Account = new Account();
 }
예제 #4
0
        public LoginViewModel(
            IScreen hostScreen = null,
            IAccountApiService accountApiService     = null,
            IDialogService dialogService             = null,
            IAppUserModelService appUserModelService = null,
            IUserApiService userApiService           = null,
            ILogger logger = null)
        {
            _accountApiService   = accountApiService ?? Locator.Current.GetService <IAccountApiService>();
            _dialogService       = dialogService ?? Locator.Current.GetService <IDialogService>();
            _appUserModelService = appUserModelService ?? Locator.Current.GetService <IAppUserModelService>();
            _userApiService      = userApiService ?? Locator.Current.GetService <IUserApiService>();
            _logger = logger ?? Locator.Current.GetService <ILogger>();

            GoToRegisterCommand = ReactiveCommand.CreateFromTask(GoToRegister);

            var validateLoginDetailsObservable = this.WhenAnyValue(vm => vm.Username, vm => vm.Password,
                                                                   (un, pw) => SetIsUsernameValid(un) && SetIsPasswordValid(pw)).StartWith(false);

            validateLoginDetailsObservable.ToProperty(this, vm => vm.CanSubmit, out _canSubmitPropertyHelper);

            LoginCommand = ReactiveCommand.CreateFromTask(Login, validateLoginDetailsObservable);
        }
 public AccountController(
     IAccountApiService service
     )
 {
     _service = service;
 }
 public AccountController(IAccountApiService accountApiService)
 {
     this._accountApiService = accountApiService;
 }