private async void btnSubmit_Clicked(object sender, EventArgs e) { slForm.IsVisible = false; aiActivity.IsRunning = true; var response = await RockClient.LogIn(username.Text, password.Text); switch (response) { case LoginResponse.Error: aiActivity.IsRunning = false; slForm.IsVisible = true; App.Current.MainPage.DisplayAlert("Log-in Error", "There was an issue with your log-in attempt. Please try again later. (Sorry)", "OK"); break; case LoginResponse.Failure: aiActivity.IsRunning = false; slForm.IsVisible = true; App.Current.MainPage.DisplayAlert("Log-in Error", "Your username or password was incorrect.", "OK"); break; case LoginResponse.Success: AvalancheNavigation.Footer = null; App.Current.MainPage = new AvalanchePage(); AvalancheNavigation.RequestNewRckipid(); break; default: break; } }
private async void btnPin_Clicked(object sender, EventArgs e) { slPin.IsVisible = false; slLoading.IsVisible = true; var response = await RockClient.LogIn("__PHONENUMBER__+1" + phoneNumber, ePin.Text); switch (response) { case LoginResponse.Error: App.Current.MainPage.DisplayAlert("Log-in Error", "There was an issue with your log-in attempt. Please try again later. (Sorry)", "OK"); slPin.IsVisible = true; slLoading.IsVisible = false; break; case LoginResponse.Failure: App.Current.MainPage.DisplayAlert("Log-in Error", "Phone number and pin did not match. Please try again.", "OK"); slPin.IsVisible = true; slLoading.IsVisible = false; break; case LoginResponse.Success: AvalancheNavigation.Footer = null; App.Current.MainPage = new AvalanchePage(); AvalancheNavigation.RequestNewRckipid(); break; default: break; } }