/// <summary> /// Project constructor /// Constructs a new Project object with a path and a name /// </summary> /// <param name="path">The path to the project folder</param> /// <param name="name">The name of the project and by extension the name of the workspace</param> public Project(string fullPath) : base(fullPath) { models = new ObservableCollection<Mckineap.Models.Engine3D.Model3D>(); LoadModels3D(); preferences = new ProjectPreferences(System.IO.Path.Combine(ParentPath, "Preferences")); IsInitialized = CheckModelsWorkspace() && preferences.IsInitialized; }
private Session() { applicationFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), SessionConstants.ApplicationFolderName); if (!Directory.Exists(applicationFolder)) CreateApplicationFolder(); systemPreferences = new SystemPreferences(Path.Combine(applicationFolder, SessionConstants.SystemPreferencesFolderName)); applicationFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); LoadSystemPreferences(); workspace = new Workspace(systemPreferences.GetSettingValue("Software", "Workspace path")); currentProject = null; capture = new Capture(); viewport = null; }
private void SaveSettings(Preferences preferences) { foreach (Settings settings in preferences.Settings) { string settingsFilePath = preferences.GetCategoryFileFromName(settings.Category); if (!File.Exists(settingsFilePath)) File.Create(settingsFilePath).Dispose(); SerializationManager.SerializeToXml<Settings>(settings, settingsFilePath); } }