/// <summary> /// Returns the preferences object for the given project /// and creates a new instance if necessary. /// </summary> public ProjectPreferences GetPrefs(Project project) { foreach (ProjectPreferences prefs in projectPrefList) { if (prefs.ProjectPath == project.ProjectPath) { return(prefs); } } // ok, we haven't seen this project before. let's take this opportunity // to clean out any prefs for projects that don't exist anymore CleanOldPrefs(); ProjectPreferences newPrefs = new ProjectPreferences(project.ProjectPath); projectPrefList.Add(newPrefs); return(newPrefs); }
void CloseProject(bool internalClosing) { Project project = Tree.Projects.Count > 0 ? Tree.Projects[0] : null; // TODO we need a main project/solution if (project == null) { return; // already closed } listenToPathChange = false; // save project prefs ProjectPreferences prefs = Settings.GetPrefs(project); prefs.ExpandedPaths = Tree.ExpandedPaths; if (!PluginBase.MainForm.ClosingEntirely) { SaveProjectSession(); } activeProject = null; if (projectResources != null) { projectResources.Close(); projectResources = null; } if (!internalClosing) { pluginUI.SetProject(null); Settings.LastProject = ""; menus.DisabledForBuild = true; PluginBase.CurrentSolution = null; PluginBase.CurrentProject = null; PluginBase.CurrentSDK = null; PluginBase.MainForm.RefreshUI(); BroadcastProjectInfo(null); } TabColors.UpdateTabColors(Settings); }
/// <summary> /// Returns the preferences object for the given project /// and creates a new instance if necessary. /// </summary> public ProjectPreferences GetPrefs(Project project) { foreach (ProjectPreferences prefs in projectPrefList) { if (prefs.ProjectPath == project.ProjectPath) { return(prefs); } } // ok, we haven't seen this project before. let's take this opportunity // to clean out any prefs for projects that don't exist anymore CleanOldPrefs(); ProjectPreferences newPrefs = new ProjectPreferences(project.ProjectPath); newPrefs.DebugMode = project.EnableInteractiveDebugger && project.OutputType != OutputType.OtherIDE && project.OutputPath != ""; projectPrefList.Add(newPrefs); return(newPrefs); }
/// <summary> /// Returns the preferences object for the given project /// and creates a new instance if necessary. /// </summary> public ProjectPreferences GetPrefs(Project project) { foreach (ProjectPreferences prefs in projectPrefList) if (prefs.ProjectPath == project.ProjectPath) return prefs; // ok, we haven't seen this project before. let's take this opportunity // to clean out any prefs for projects that don't exist anymore CleanOldPrefs(); ProjectPreferences newPrefs = new ProjectPreferences(project.ProjectPath); newPrefs.DebugMode = !project.NoOutput && project.OutputPath != ""; projectPrefList.Add(newPrefs); return newPrefs; }