/// <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); }
/// <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); }
/// <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); }