/// <summary> /// Invoked when the Sign Up button is clicked. /// </summary> /// <param name="obj">The Object</param> private async void SignUpClicked(object obj) { if (Password == ConfirmPassword) { ApiResponse <Member> response = await Members.CreateMember(FirstName, LastName, Birthday, Email, Password); if (response.StatusCode == 200) { ApiResponse <AuthenticateResponse> loginResponse = await YakkaApi.Current.Login(Email, Password); if (loginResponse.StatusCode == 200) { await Shell.Current.GoToAsync("//Yakka/Home"); } else { ErrorMessage = loginResponse.ErrorMessage; ErrorIsVisible = true; Page p = obj as Page; await p.DisplayAlert("Error", ErrorMessage, "OK"); } } else { ErrorMessage = response.ErrorMessage; ErrorIsVisible = true; Page p = obj as Page; await p.DisplayAlert("Error", ErrorMessage, "OK"); } } else { ErrorMessage = "Passwords do not match"; ErrorIsVisible = true; Page p = obj as Page; await p.DisplayAlert("Error", ErrorMessage, "OK"); } }