Created
December 6, 2014 20:39
-
-
Save scionwest/7b7d3849d5b6cb0b3030 to your computer and use it in GitHub Desktop.
ViewModel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task ExecuteSignin() | |
{ | |
this.IsSigningIn = true; | |
bool signinFailed = false; | |
string failureMesage = string.Empty; | |
try | |
{ | |
User user = await this.userService.RetrieveUser(this.Username, this.Password); | |
this.navigationService.Navigate("Main", user); | |
} | |
catch (Exception ex) | |
{ | |
signinFailed = true; | |
failureMesage = ex.Message; | |
} | |
if (signinFailed) | |
{ | |
await this.alertService.ShowAsync( | |
"Signin Failure", | |
"Invalid username and/or password"); | |
this.Password = string.Empty; | |
} | |
this.IsSigningIn = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment