Пример #1
0
        /// <summary>
        /// Creates a new empty property bag in the current project folder, and shows it in the document area.
        /// </summary>
        /// <param name="ctrl">Project browse controller.</param>
        /// <returns>The property bag.</returns>
        public static Altaxo.Main.Properties.ProjectFolderPropertyDocument CreateNewPropertyBag(this ProjectBrowseController ctrl)
        {
            if (!ctrl.IsProjectFolderSelected(out var folderName))
            {
                folderName = ProjectFolder.RootFolderName;
            }

            if (!Current.Project.ProjectFolderProperties.TryGetValue(folderName, out var bag))
            {
                bag = new Altaxo.Main.Properties.ProjectFolderPropertyDocument(folderName);
                Current.Project.ProjectFolderProperties.Add(bag);
            }
            return(bag);
        }
Пример #2
0
		/// <summary>
		/// Creates a new empty property bag in the current project folder, and shows it in the document area.
		/// </summary>
		/// <param name="ctrl">Project browse controller.</param>
		/// <returns>The property bag.</returns>
		public static Altaxo.Main.Properties.ProjectFolderPropertyDocument CreateNewPropertyBag(this ProjectBrowseController ctrl)
		{
			string folderName;
			if (!ctrl.IsProjectFolderSelected(out folderName))
				folderName = ProjectFolder.RootFolderName;

			Altaxo.Main.Properties.ProjectFolderPropertyDocument bag;
			if (!Current.Project.ProjectFolderProperties.TryGetValue(folderName, out bag))
			{
				bag = new Altaxo.Main.Properties.ProjectFolderPropertyDocument(folderName);
				Current.Project.ProjectFolderProperties.Add(bag);
			}
			return bag;
		}