Example #1
0
        async void HandleLoginCommand()
        {
            User = new User()
            {
                username = "******", email = "*****@*****.**", password = "******"
            };
            await _apiClientService.PostAsync <User>(User, ApiRoutes.RegisterUserMethodName);

            //navigationService.SetRootPage<MainPage>();
        }
 async void HandleCodeConfirmationCommand()
 {
     User = new User()
     {
         email = Email,
         code  = Code
     };
     await _apiClientService.PostAsync <User>(User, ApiRoutes.ActivateUserMethodName, (isSuccess, responseMessage) => {
         ResponseMessage = responseMessage;
         DependencyService.Get <IOperatingSystemMethods>().ShowToast(responseMessage);
         if (isSuccess)
         {
             _navigationService.SetRootPage <MainPage>();
         }
     });
 }
 async void HandleRegisterUserCommand()
 {
     User = new User()
     {
         username = Username,
         email    = Email,
         password = Password
     };
     await _apiClientService.PostAsync <User>(User, ApiRoutes.RegisterUserMethodName, (isSuccess, responseMessage) => {
         ResponseMessage = responseMessage;
         DependencyService.Get <IOperatingSystemMethods>().ShowToast(responseMessage);
         if (isSuccess)
         {
             _navigationService.SetRootPage <CodeConfirmation>();
         }
     });
 }