public void ShowCaptchaRequest(VKCaptchaUserRequest captchaUserRequest, Action <VKCaptchaUserResponse> callback)
 {
     textBoxCaptcha.Text = string.Empty;
     imageCaptcha.Source = new BitmapImage(new Uri(captchaUserRequest.Url));
     _captchaUserRequest = captchaUserRequest;
     _callback           = callback;
     ShowInPopup(Window.Current.Bounds.Width, Window.Current.Bounds.Height);
 }
예제 #2
0
 public void ShowCaptchaRequest(VKCaptchaUserRequest captchaUserRequest, Action <VKCaptchaUserResponse> callback)
 {
     Visibility          = Visibility.Visible;
     textBoxCaptcha.Text = string.Empty;
     imageCaptcha.Source = new BitmapImage(new Uri(captchaUserRequest.Url));
     _captchaUserRequest = captchaUserRequest;
     _callback           = callback;
 }
예제 #3
0
        private void CaptchaRequest(VKCaptchaUserRequest captchaUserRequest, Action <VKCaptchaUserResponse> action)
        {
            this.Focus();

            if (captchaRequestControl != null)
            {
                captchaRequestControl.ShowCaptchaRequest(captchaUserRequest, action);
            }
        }
예제 #4
0
        internal static void InvokeCaptchaRequest(VKCaptchaUserRequest request, Action <VKCaptchaUserResponse> callback)
        {
            if (CaptchaRequest == null)
            {
                // no handlers are registered

                callback(
                    new VKCaptchaUserResponse()
                {
                    Request       = request,
                    EnteredString = string.Empty,
                    IsCancelled   = true
                });
            }
            else
            {
                VKExecute.ExecuteOnUIThread(() =>
                {
                    CaptchaRequest(request,
                                   callback);
                });
            }
        }
예제 #5
0
 private void CaptchaRequest(VKCaptchaUserRequest captchaUserRequest, Action <VKCaptchaUserResponse> action)
 {
     new VKCaptchaRequestUserControl().ShowCaptchaRequest(captchaUserRequest, action);
 }