コード例 #1
0
        /// <summary>
        /// Saves pending files to project folder.
        /// </summary>
        /// <returns>True if successful, false otherwise.</returns>
        public bool SaveChanges()
        {
            // TODO: Make sure no conflicts still exist

            // Save all changes in the user folders
            if (Directory.Exists(Controller.Instance.ProjectSettings.ProjectPath))
            {
                IOUtility.CopyMergedFolder(StagingFolder, Controller.Instance.ProjectSettings.ProjectPath);
                IOUtility.ArchiveFolder(Controller.Instance.GetTempFilePathForComponent(ComponentKey.WorkbenchFileGenerator), Controller.Instance.GetTempFilePathForComponent(ComponentKey.WorkbenchFileGenerator), Controller.Instance.ProjectSettings.ProjectPath);
                return(true);
            }
            throw new Exception("Project folder is missing: " + Controller.Instance.ProjectSettings.ProjectPath);
        }