/// <summary> /// 重新上传单个文档 /// </summary> public void reUploadFile(UploadInfoComps comps) { comps.vo.status = "resume"; UploadHelper.uploadingFileCount++; uploadHelper.UploadFile(comps.vo); //uploading_FileCountLabel.Text = "正在上传" + uploadHelper.voList.Count + "个文档"; }
private void UploadBeginEventHander(UploadItemVO vo) { UploadInfoComps comps = new UploadInfoComps(); comps.vo = vo; UploadItem item = new UploadItem(this, comps, uploadHelper, floatWin); itemDic[vo.name] = item; }
public UploadItem(UploadDetail uploadDetail, UploadInfoComps comps) { this.uploadDetail = uploadDetail; this.uploadingItemContainer = uploadDetail.getUploadingItemContainer(); this.comps = comps; InitializeComponent(); init(); addItems(comps.vo); this.uploadingItemContainer.Controls.Add(this); }
public void delSuccessItem(UploadInfoComps comps) { if (null != comps.thread && (comps.thread.ThreadState != ThreadState.Stopped || comps.thread.ThreadState != ThreadState.Aborted)) { comps.thread.Abort(); } successList.Remove(comps.vo); uploaded_FileCountLabel.Text = "上传成功" + successList.Count() + "个文档"; }
public void start(UploadInfoComps comps) { comps.start.Visible = false; comps.pause.Visible = true; comps.btnPanel.Left = 715; comps.fileStatus.Text = "上传中..."; comps.vo.status = "uploading"; //重新上传 reUploadFile(comps); }
public UploadItem(UploadDetail uploadDetail, UploadInfoComps comps, UploadHelper uploadHelper, FloatWin floatWin) { this.uploadDetail = uploadDetail; this.uploadingItemContainer = uploadDetail.getUploadingItemContainer(); this.comps = comps; this.floatWin = floatWin; this.uploadHelper = uploadHelper; InitializeComponent(); init(); addItems(comps.vo); this.uploadingItemContainer.Controls.Add(this); }
public UploadedItem(UploadDetail uploadDetail, UploadItemVO obj) { this.uploadDetail = uploadDetail; this.uploadedItemContainer = uploadDetail.getUploadedItemContainer(); InitializeComponent(); comps = new UploadInfoComps(); comps.vo = obj; init(); addItems(obj); this.uploadedItemContainer.Controls.Add(this); }
public void del(UploadInfoComps comps) { if (null != comps.thread && (comps.thread.ThreadState != ThreadState.Stopped || comps.thread.ThreadState != ThreadState.Aborted)) { comps.thread.Abort(); } List <UploadItemVO> voList = uploadHelper.voList; uploading_FileCountLabel.Text = "正在上传" + (uploadHelper.voList.Count - 1) + "个文档"; voList.Remove(comps.vo); try { comps.vo.request.Abort(); } catch (Exception e) { } }
private void displayUploadingInfo() { List <UploadItemVO> voList = uploadHelper.voList; foreach (UploadItemVO vo in voList) { UploadInfoComps comps = new UploadInfoComps(); comps.vo = vo; if (comps.vo.status == "success") { addSuccessItem(comps.vo); } else { UploadItem item = new UploadItem(this, comps, uploadHelper, floatWin); itemDic[vo.name] = item; } } }
public void pause(UploadInfoComps comps) { if (null != comps.thread) { comps.thread.Abort(); } comps.pause.Visible = false; comps.start.Visible = true; comps.btnPanel.Left = 715; comps.fileStatus.Text = "暂停中..."; comps.vo.status = "pause"; //取消上传 try { comps.vo.request.Abort(); } catch (Exception e) { } }