Exemple #1
0
 private void ThreadCopyFiles()
 {
     timerOprFiles.Interval = 10;
     timerOprFiles.Start();
     _iCurOprType  = CurOprType.CopyFile;
     lbCurOpr.Text = @"后台导出:";
     _trdFileOpr   = new Thread(CopyFiles);
     _trdFileOpr.Start();
 }
Exemple #2
0
 private void ThreadDelFiles()
 {
     timerOprFiles.Interval = 10;
     timerOprFiles.Start();
     _iCurOprType  = CurOprType.DelFile;
     lbCurOpr.Text = @"后台删除:";
     _trdFileOpr   = new Thread(DelFiles);
     _trdFileOpr.Start();
 }
Exemple #3
0
 private void ThreadMoveFiles()
 {
     timerOprFiles.Interval = 10;
     timerOprFiles.Start();
     _iCurOprType  = CurOprType.MoveFile;
     lbCurOpr.Text = @"后台移动:";
     _trdFileOpr   = new Thread(MoveFiles);
     _trdFileOpr.Start();
 }
Exemple #4
0
 private void UpdateCurOprStatus()
 {
     if (_iCurOprType == CurOprType.None)
     {
         lbCurOpr.Visible   = false;
         tssProcess.Visible = false;
     }
     else if (_iCurOprType == CurOprType.OprFinished)
     {
         timerOprFiles.Interval = 5000;
         _iCurOprType           = CurOprType.None;
     }
     else //3kinds of file opr
     {
         lbCurOpr.Visible   = true;
         tssProcess.Visible = true;
         tssProcess.Value   = FileOperator.CurIndex;
         tssProcess.Maximum = FileOperator.TotalCount;
         if (!FileOperator.BOprFilesInprocess)
         {
             var msgStr = "";
             if (_iCurOprType == CurOprType.CopyFile)
             {
                 msgStr = "导出完成 ";
             }
             else if (_iCurOprType == CurOprType.MoveFile)
             {
                 msgStr = "移动完成 ";
             }
             else if (_iCurOprType == CurOprType.DelFile)
             {
                 msgStr = "删除完成 ";
             }
             if (FileOperator.FaildCount != 0)
             {
                 msgStr += string.Format("成功{0}失败{1}个", FileOperator.CurIndex, FileOperator.FaildCount);
             }
             lbCurOpr.Text      = msgStr;
             tssProcess.Visible = false;
             _iCurOprType       = CurOprType.OprFinished;
             UpdateFilesList();
         }
     }
 }