Ejemplo n.º 1
0
 private void ShareToRenenCallBack(object sender, RenrenSDKLibrary.UploadPhotoCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         //this.textBox2.Text = e.Error.ToString();
         MessageBox.Show(e.Error.Message);
     }
     else
     {
         //this.textBox2.Text = e.Result.ToString();
         MessageBox.Show("上传成功");
         BitmapImage smallImage = new BitmapImage();
         smallImage.UriSource = new Uri(e.Result.src_small, UriKind.RelativeOrAbsolute);
         //image1.Source = smallImage;
     }
     Deployment.Current.Dispatcher.BeginInvoke(() => { NavigationService.GoBack(); });
 }
Ejemplo n.º 2
0
 //上传回调
 private void UphotPhoto_DownloadStringCompleted(object sender,
                                                 RenrenSDKLibrary.UploadPhotoCompletedEventArgs e)
 {
     if (Orientation == PageOrientation.PortraitDown || Orientation == PageOrientation.PortraitUp)
     {
         SupportedOrientations = SupportedPageOrientation.Portrait;
     }
     else
     {
         SupportedOrientations = SupportedPageOrientation.Landscape;
     }
     tb_uploading.Visibility      = System.Windows.Visibility.Collapsed;
     uploadingBar.IsIndeterminate = false;
     disableRect.Visibility       = System.Windows.Visibility.Collapsed;
     if (e.Error != null)
     {
         MessageBox.Show("上传失败");
     }
     else
     {
         MessageBox.Show("上传成功");
     }
     NavigationService.GoBack();
 }