예제 #1
0
 /// <summary>
 /// 重新上传单个文档
 /// </summary>
 public void reUploadFile(UploadInfoComps comps)
 {
     comps.vo.status = "resume";
     UploadHelper.uploadingFileCount++;
     uploadHelper.UploadFile(comps.vo);
     //uploading_FileCountLabel.Text = "正在上传" + uploadHelper.voList.Count + "个文档";
 }
예제 #2
0
        private void UploadBeginEventHander(UploadItemVO vo)
        {
            UploadInfoComps comps = new UploadInfoComps();

            comps.vo = vo;
            UploadItem item = new UploadItem(this, comps, uploadHelper, floatWin);

            itemDic[vo.name] = item;
        }
예제 #3
0
 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);
 }
예제 #4
0
 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() + "个文档";
 }
예제 #5
0
 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);
 }
예제 #6
0
 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);
 }
예제 #7
0
        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);
        }
예제 #8
0
        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)
            {
            }
        }
예제 #9
0
        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;
                }
            }
        }
예제 #10
0
 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)
     {
     }
 }