Ejemplo n.º 1
0
 internal static void InvokeValidationRequest(VKValidationRequest request, Action <VKValidationResponse> callback)
 {
     VKExecute.ExecuteOnUIThread(() =>
     {
         VKParametersRepository.SetParameterForId("ValidationCallback", callback);
         RootFrame.Navigate(new Uri(string.Format("/VK.WindowsPhone.SDK;component/Pages/VKLoginPage.xaml?ValidationUri={0}", HttpUtility.UrlEncode(request.ValidationUri)), UriKind.Relative));
     });
 }
Ejemplo n.º 2
0
        public static void Publish(VKPublishInputData data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            VKParametersRepository.SetParameterForId(VKPublishPage.INPUT_PARAM_ID, data);

            RootFrame.Navigate(new Uri(string.Format("/VK.WindowsPhone.SDK;component/Pages/VKPublishPage.xaml"), UriKind.Relative));
        }
Ejemplo n.º 3
0
        internal static void InvokeValidationRequest(VKValidationRequest request, Action <VKValidationResponse> callback)
        {
            VKExecute.ExecuteOnUIThread(() =>
            {
#if SILVERLIGHT
                VKParametersRepository.SetParameterForId("ValidationCallback", callback);
                RootFrame.Navigate(new Uri(string.Format("/VK.WindowsPhone.SDK;component/Pages/VKLoginPage.xaml?ValidationUri={0}", HttpUtility.UrlEncode(request.ValidationUri)), UriKind.Relative));
#else
                var loginUserControl = new VKLoginUserControl();

                loginUserControl.ValidationUri      = request.ValidationUri;
                loginUserControl.ValidationCallback = callback;

                loginUserControl.ShowInPopup(Windows.UI.Xaml.Window.Current.Bounds.Width,
                                             Windows.UI.Xaml.Window.Current.Bounds.Height);
#endif
            });
        }