Exemplo n.º 1
0
 public void Save(bool ignoreBackup = false)
 {
     if (ConfigSettings.BackupBeforeProjectEdit && !ignoreBackup)
     {
         ProjectBackup projBackup = new ProjectBackup();
         projBackup.DeleteOldBackups(this.FileDirectory);
         projBackup.Backup(this.FilePath, this.syncItems.ToList(), Constants.SyncOperation.ProjectEdit);
     }
     projectFile.Save(syncItems.ToList());
     this.HasChanges = false;
 }
Exemplo n.º 2
0
        public void CopyCheckedTargetFilesToWorkings()
        {
            if (ConfigSettings.BackupBeforeRight)
            {
                ProjectBackup projBackup = new ProjectBackup();
                projBackup.DeleteOldBackups(this.FileDirectory);
                projBackup.Backup(this.FilePath, this.syncItems.ToList(), Constants.SyncOperation.SyncRightToLeft);
            }

            foreach (SyncItem item in this.CheckedItems)
            {
                this.CopyTargetToWorking(item);
                if (FileCopied != null)
                {
                    FileCopied(this, new FileCopiedEventArgs(item, FileCopiedEventArgs.FileCopyDirection.TargetToWorking));
                }
            }
        }