Esempio n. 1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            var ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                _cfsettings.RootDirArr[0] = _fileParseTool.GetRootDirByPath(ofd.FileName);
                InitFileParseTool();
                PlayRecord(ofd.FileName);
                UpdateCalender(true);
            }
        }
Esempio n. 2
0
 public void CopyFiles(List <string> files, string trgRootFolder)
 {
     CurIndex           = 0;
     FaildCount         = 0;
     TotalCount         = files.Count;
     BOprFilesInprocess = true;
     foreach (var filePath in files)
     {
         var oldRoot  = FileTool.GetRootDirByPath(filePath);
         var destPath = filePath.Replace(oldRoot, trgRootFolder);
         CheckOrCreateFolder(destPath);
         try
         {
             File.Copy(filePath, destPath, false);
             CurIndex++;
         }
         catch (Exception)
         {
             FaildCount++;
         }
     }
     BOprFilesInprocess = false;
 }