コード例 #1
0
ファイル: Package.cs プロジェクト: dkv01/withSIX.Desktop
 void HandleCopy(ICollection <KeyValuePair <string, List <string> > > copy, IDictionary <string, Status> statusDic)
 {
     StatusRepo.ResetWithoutClearItems(RepoStatus.Copying, copy.Count);
     copy.ForEach(x => {
         x.Value.ForEach(y => CopyExistingWorkingFile(statusDic, y, x.Key));
         StatusRepo.IncrementDone();
     });
 }
コード例 #2
0
ファイル: Package.cs プロジェクト: dkv01/withSIX.Desktop
        void HandleRemove(List <string> remove, IDictionary <string, Status> statusDic)
        {
            StatusRepo.ResetWithoutClearItems(RepoStatus.Removing, remove.Count());

            remove.ForEach(x => ProcessRemoved(statusDic, x));

            foreach (var d in GetEmptyDirectories(remove))
            {
                Tools.FileUtil.Ops.DeleteDirectory(d);
                StatusRepo.IncrementDone();
            }
        }
コード例 #3
0
ファイル: Package.cs プロジェクト: dkv01/withSIX.Desktop
        void HandleModify(ICollection <FileObjectMapping> modify, IDictionary <string, Status> statusDic,
                          ProgressLeaf progressLeaf)
        {
            StatusRepo.ResetWithoutClearItems(RepoStatus.Unpacking, modify.Count);
            var i = 0;

            modify.OrderByDescending(x => Tools.FileUtil.SizePrediction(x.FilePath))
            .ForEach(m => {
                ProcessModified(statusDic, m,
                                (p, s) => progressLeaf?.Update(null, (i + p / 100).ToProgress(modify.Count)));
                StatusRepo.IncrementDone();
                progressLeaf?.Update(null, i++.ToProgress(modify.Count));
            });
            progressLeaf?.Finish();
        }
コード例 #4
0
ファイル: Package.cs プロジェクト: dkv01/withSIX.Desktop
 void HandleChangedCase(ICollection <KeyValuePair <string, string> > changedCase,
                        IDictionary <string, Status> statusDic)
 {
     StatusRepo.ResetWithoutClearItems(RepoStatus.Renaming, changedCase.Count);
     changedCase.ForEach(x => RenameExistingObject(statusDic, x.Value, x.Key));
 }