Example #1
0
 public LoginViewModel(IPageService pageService)
 {
     _pageService            = pageService;
     _username               = new ValidatableObject <string>();
     _password               = new ValidatableObject <string>();
     ValidateUsernameCommand = new Command(() => ValidateUsername());
     ValidatePasswordCommand = new Command(() => ValidatePassword());
     //AutoLoginCommand = new Command(async () => await AutoLoginAsync());
     LoginCommand    = new Command(OnLogin);
     RegisterCommand = new Command(OnRegister);
     AddValidations();
 }
Example #2
0
 public RegistrationViewModel(IPageService pageService)
 {
     _pageService  = pageService;
     _username     = new ValidatableObject <string>();
     _name         = new ValidatableObject <string>();
     _street       = new ValidatableObject <string>();
     _city         = new ValidatableObject <string>();
     _postcode     = new ValidatableObject <string>();
     _email        = new ValidatableObject <string>();
     _phoneNo      = new ValidatableObject <string>();
     _password     = new ValidatableObject <string>();
     _type         = new ValidatableObject <string>();
     newUser       = new User();
     SubmitCommand = new Command(OnSubmit);
     AddValidations();
 }