private void PhoneNumberVerification(object sender, VerificationEventArgs e) { try { switch (e.Status) { case VerificationStatus.Success: indicator.IsRunning = false; indicator.IsVisible = false; Navigation.PushAsync(new UserInfoPage()); var navigationList = Navigation.NavigationStack.ToList(); var smsPage = navigationList.FirstOrDefault(x => x.GetType() == typeof(SmsVerificationPage)); Navigation.RemovePage(smsPage); break; case VerificationStatus.Failed: if (!string.IsNullOrEmpty(e.Message)) { Application.Current.MainPage.DisplayAlert("Alert", e.Message, "OK"); } else { Application.Current.MainPage.DisplayAlert("Alert", "Verification failed!", "OK"); } break; } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void verificationComponent1_Verificationed(VerificationEventArgs e) { if (!e.IsVerifySuccess) { lstErrorControl.Add(e.VerificationControl); } }
async void LoginVerification(object sender, VerificationEventArgs e) { try { switch (e.Status) { case VerificationStatus.Success: await Navigation.PushAsync(new UserInfoPage()); break; case VerificationStatus.CodeSent: indicator.IsRunning = false; indicator.IsVisible = false; await Navigation.PushAsync(new SmsVerificationPage(phoneEntry.Text)); break; case VerificationStatus.Failed: if (!string.IsNullOrEmpty(e.Message)) { await Application.Current.MainPage.DisplayAlert("Alert", e.Message, "OK"); } else { await Application.Current.MainPage.DisplayAlert("Alert", "Login failed!", "OK"); } break; } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
void ApplicationEvents_VerificationChanged(object sender, VerificationEventArgs e) { Text = CurrentApplication.Name + " - (" + CurrentApplication.CurrentVerification + ")"; if (Environment.CommandLine.Contains(" /developer")) { Text += " - Debug"; } }