Exemplo n.º 1
0
 /// <summary>
 /// 上传照片接口
 /// </summary>
 /// <param name="fileName">文件全路径</param>
 /// <param name="caption">描述</param>
 /// <param name="albumId">回调</param>
 public void UploadPhoto(string fileName, UploadPhotoCompletedHandler callback,
                         string caption, int albumId)
 {
     if (uploadBS == null)
     {
         uploadBS = new UploadPhotoBS();
     }
     uploadBS.CleanUploadPhotoEvent();
     uploadBS.UploadCompleted += callback;
     uploadBS.UploadPhoto(fileName, caption, albumId);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 清空信息
 /// </summary>
 public void LogOut()
 {
     loginBS       = null;
     friendBS      = null;
     loginViewBS   = null;
     uploadBS      = null;
     getUserInfoBS = null;
     getAlbumsBS   = null;
     createAlbumBS = null;
     apiRequestBS  = null;
     RenrenInfo.CleanUp();
 }
Exemplo n.º 3
0
        //upload button
        private void upload_Click(object sender, RoutedEventArgs e)
        {
            canGoBack = false;
            tb_uploading.Visibility      = System.Windows.Visibility.Visible;
            uploadingBar.IsIndeterminate = true;
            disableRect.Visibility       = System.Windows.Visibility.Visible;

            if (uploadBS == null)
            {
                uploadBS = new UploadPhotoBS();
            }
            uploadBS.UploadCompleted -= UphotPhoto_DownloadStringCompleted;
            uploadBS.UploadCompleted += UphotPhoto_DownloadStringCompleted;

            uploadBS.UploadPhoto((BitmapImage)img_pic.Source, imgPath, imgCaption, 0);
        }
Exemplo n.º 4
0
 /// <summary>
 /// 上传照片接口
 /// </summary>
 /// <param name="fileName">文件全路径</param>
 /// <param name="caption">描述</param>
 /// <param name="albumId">回调</param>
 public void UploadPhoto(string fileName,UploadPhotoCompletedHandler callback,
     string caption, int albumId)
 {
     if (uploadBS == null)
      {
          uploadBS = new UploadPhotoBS();
      }
      uploadBS.CleanUploadPhotoEvent();
      uploadBS.UploadCompleted += callback;
      uploadBS.UploadPhoto(fileName, caption, albumId);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 清空信息
 /// </summary>
 public void LogOut()
 {
     loginBS = null;
     friendBS = null;
     loginViewBS = null;
     uploadBS = null;
     getUserInfoBS = null;
     getAlbumsBS = null;
     createAlbumBS = null;
     apiRequestBS = null;
     RenrenInfo.CleanUp();
 }
        //upload button
        private void upload_Click(object sender, RoutedEventArgs e)
        {
            canGoBack = false;
            tb_uploading.Visibility = System.Windows.Visibility.Visible;
            uploadingBar.IsIndeterminate = true;
            disableRect.Visibility = System.Windows.Visibility.Visible;

            if (uploadBS == null)
            {
                uploadBS = new UploadPhotoBS();
            }
            uploadBS.UploadCompleted -= UphotPhoto_DownloadStringCompleted;
            uploadBS.UploadCompleted += UphotPhoto_DownloadStringCompleted;

            uploadBS.UploadPhoto((BitmapImage)img_pic.Source, imgPath, imgCaption, 0);
        }