コード例 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (!_isInitialized)
            {
                var publishParams = VKParametersRepository.GetParameterForIdAndReset(INPUT_PARAM_ID) as VKPublishInputData;


                _inputData = publishParams;

                InitializeUIFromInputParams();

                UpdateState();

                _isInitialized = true;
            }
        }
コード例 #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (!_isInitialized)
            {
                var publishParams = VKParametersRepository.GetParameterForIdAndReset(INPUT_PARAM_ID) as VKPublishInputData;


                _inputData = publishParams;

                InitializeUIFromInputParams();

                UpdateState();

                _isInitialized = true;
            }
        }
コード例 #3
0
 public void wall_post(string par)
 {
     string[] options = JsonHelper.Deserialize<string[]>(par);
     VKPublishInputData data = new VKPublishInputData();
     try {
         JObject p = JObject.Parse(options[0]);
         var dict = p.ToObject<Dictionary<string, string>>();
         data.Text = dict["message"];
         // TODO links and images
     } catch (Exception e) {
         data.Text = options[0];
     }
     DispatchInvoke(() => {
         VKSDK.Publish(data);
     });
 }
コード例 #4
0
        private void Publish_Click(object sender, RoutedEventArgs e)
        {
            var rs = Application.GetResourceStream(new Uri("TestImage.jpg", UriKind.Relative));        
            Stream imageStream = rs.Stream;

            var inputData = new VKPublishInputData
            {
                Text = "В Доме Зингера",
                Image = imageStream, 
                ExternalLink = new VKPublishInputData.VKLink
                {
                    Title = "VK",
                    Subtitle = "VKontakte",
                    Uri = "http://VK.com"
                }
            };

            VKSDK.Publish(inputData);
        }
コード例 #5
0
ファイル: VKSDK.cs プロジェクト: orinichevd/BVk
        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));
        }