Пример #1
0
        public ProjectInfo CreateProjectFolder(ProjectByType creator)
        {
            IsNew        = true;
            RelativePath = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + Path.DirectorySeparatorChar;
            CreatedBy    = creator;

            Directory.CreateDirectory(FullPath);

            #region Create ActionStack folders

            if (!Directory.Exists(ActionStackPath))
            {
                Directory.CreateDirectory(ActionStackPath);
            }

            if (!Directory.Exists(UndoStackPath))
            {
                Directory.CreateDirectory(UndoStackPath);
            }

            if (!Directory.Exists(RedoStackPath))
            {
                Directory.CreateDirectory(RedoStackPath);
            }

            #endregion

            CreateMutex();

            return(this);
        }
Пример #2
0
        public ProjectInfo CreateProjectFolder(ProjectByType creator)
        {
            //Check if the parameter exists.
            if (string.IsNullOrWhiteSpace(UserSettings.All.TemporaryFolder))
            {
                UserSettings.All.TemporaryFolder = Path.GetTempPath();
            }

            IsNew        = true;
            RelativePath = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + Path.DirectorySeparatorChar;
            CreatedBy    = creator;

            Directory.CreateDirectory(FullPath);

            #region Create ActionStack folders

            if (!Directory.Exists(ActionStackPath))
            {
                Directory.CreateDirectory(ActionStackPath);
            }

            if (!Directory.Exists(UndoStackPath))
            {
                Directory.CreateDirectory(UndoStackPath);
            }

            if (!Directory.Exists(RedoStackPath))
            {
                Directory.CreateDirectory(RedoStackPath);
            }

            #endregion

            CreateMutex();

            return(this);
        }