private async void UpdateProfileStatus(string voiceProfileId)
        {
            progressbar.Visibility = Visibility.Visible;
            try
            {
                VerificationProfile profile = await _serviceClient.GetProfileAsync(voiceProfileId);

                enrollmentCountTB.Text           = profile.enrollmentsCount.ToString();
                remainingEnrollmentsCountTB.Text = profile.remainingEnrollmentsCount.ToString();
                enrollmentStatusTB.Text          = profile.EnrollmentStatus.ToString();

                if (profile.remainingEnrollmentsCount == 0)
                {
                    EnrollBtn.Visibility = Visibility.Collapsed;
                    NextBtn.Visibility   = Visibility.Visible;
                    VoiceCB.IsChecked    = true;
                }
                Step2GuideTB.Foreground = new SolidColorBrush(Colors.Green);

                progressbar.Visibility = Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                LoggingMsg("Retrieve profile error : " + ex.Message);
            }
        }
        private async Task <Boolean> GetStatusProfile(string voiceProfileId)
        {
            progressbar.Visibility = Visibility.Visible;
            try
            {
                Debug.WriteLine("123" + voiceProfileId);

                VerificationProfile profile = await _serviceClient.GetProfileAsync(voiceProfileId);

                progressbar.Visibility = Visibility.Collapsed;
                if (profile.EnrollmentStatus == EnrollmentStatus.Enrolled)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LoggingMsg("Retrieve profile error : " + ex.Message);
                return(false);
            }
        }
示例#3
0
        public async Task RemoveVerificationProfileAsync(VerificationProfile profile)
        {
            var response = await this.HttpClient.DeleteAsync(
                new Uri($"{OXFORD_BASE_URL}/{OXFORD_VERIFICATION_PROFILES_ENDPOINT}/" +
                        Uri.EscapeDataString(profile.VerificationProfileId.ToString())));

            this.ThrowOnFailStatus(response, string.Empty);
        }
示例#4
0
        public async Task <ActionResult> CreateProfile(VerificationProfile model)
        {
            if (ModelState.IsValid)
            {
                var profileId = await AudioVerificationService.CreateProfile(model);

                return(RedirectToAction("EnrollProfile", new { id = profileId, locale = model.SelectedLocale }));
            }

            return(View(model));
        }
示例#5
0
        public IActionResult CreateProfile()
        {
            var model = new VerificationProfile();

            return(View(model));
        }