public LoginViewModel()
 {
     _storedSettingsService = Mvx.Resolve <IStoredSettingsService>();
     _facebookLoginService  = Mvx.Resolve <IFacebookLoginService>();
     _gPlusLoginService     = Mvx.Resolve <IGPlusLoginService>();
     _emailLoginCommand     = new MvxCommand(() => ServerCommandWrapper(() => LoginTask(EmailLoginData)));
     _facebookLoginCommand  = new MvxCommand(() => ServerCommandWrapper(async() => await LoginTask(await _facebookLoginService.GetPersonData())));
     _gPlusLoginCommand     = new MvxCommand(() => ServerCommandWrapper(async() => await LoginTask(await _gPlusLoginService.GetPersonData())));
     _registrationCommand   = new MvxCommand(() => { ShowViewModel <RegistrationViewModel>(); });
     _forgotPasswordCommand = new MvxCommand(() => { });
 }
示例#2
0
 public LoginViewModel(IStoredSettingsService storedSettingsService, IFacebookLoginService facebookLoginService, IGPlusLoginService gPlusLoginService,
                       IServerApiService serverApiService)
 {
     _storedSettingsService = storedSettingsService;
     _facebookLoginService  = facebookLoginService;
     _gPlusLoginService     = gPlusLoginService;
     _serverApiService      = serverApiService;
     _emailLoginCommand     = new MvxCommand(() => ServerCommandWrapperAsync(() => LoginTaskAsync(EmailLoginData)));
     _facebookLoginCommand  = new MvxCommand(() => ServerCommandWrapperAsync(async() => await LoginTaskAsync(await _facebookLoginService.GetPersonDataAsync())));
     _gPlusLoginCommand     = new MvxCommand(() => ServerCommandWrapperAsync(async() => await LoginTaskAsync(await _gPlusLoginService.GetPersonDataAsync())));
     _registrationCommand   = new MvxCommand(() => { ShowViewModel <RegistrationViewModel>(); });
     _forgotPasswordCommand = new MvxCommand(() => { });
 }