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); }
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); }