Esempio n. 1
0
 public CategoryGridEntryAccessibleObject(CategoryGridEntry owningCategoryGridEntry) : base(owningCategoryGridEntry)
 {
     _owningCategoryGridEntry = owningCategoryGridEntry;
 }
Esempio n. 2
0
		private void UpdateSortLayout (GridEntry rootItem)
		{
			if (rootItem == null)
				return;

			GridItemCollection reordered = new GridItemCollection ();

			if (property_sort == PropertySort.Alphabetical || property_sort == PropertySort.NoSort) {
				alphabetic_toolbarbutton.Pushed = true;
				categorized_toolbarbutton.Pushed = false;
				foreach (GridItem item in rootItem.GridItems) {
					if (item.GridItemType == GridItemType.Category) {
						foreach (GridItem categoryChild in item.GridItems) {
							reordered.Add (categoryChild);
							((GridEntry)categoryChild).SetParent (rootItem);
						}
					} else {
						reordered.Add (item);
					}
				}
			} else if (property_sort == PropertySort.Categorized || 
				   property_sort == PropertySort.CategorizedAlphabetical) {
				alphabetic_toolbarbutton.Pushed = false;
				categorized_toolbarbutton.Pushed = true;
				GridItemCollection categories = new GridItemCollection ();

				foreach (GridItem item in rootItem.GridItems) {
					if (item.GridItemType == GridItemType.Category) {
						categories.Add (item);
						continue;
					}

					string categoryName = item.PropertyDescriptor.Category;
					if (categoryName == null)
						categoryName = UNCATEGORIZED_CATEGORY_LABEL;
					GridItem category_item = rootItem.GridItems [categoryName];
					if (category_item == null)
						category_item = categories [categoryName];

					if (category_item == null) {
						// Create category grid items if they already don't
						category_item = new CategoryGridEntry (this, categoryName, rootItem);
						category_item.Expanded = true;
						categories.Add (category_item);
					}

					category_item.GridItems.Add (item);
					((GridEntry)item).SetParent (category_item);
				}

				reordered.AddRange (categories);
			}

			rootItem.GridItems.Clear ();
			rootItem.GridItems.AddRange (reordered);
		}
Esempio n. 3
0
 internal PropertyGridCategoryProvider(PropertyGridViewProvider prov, PropertyGridView grid, PGI.CategoryGridEntry entry)
     : base(prov, grid, entry)
 {
     this.entry = entry;
 }
Esempio n. 4
0
		internal PropertyGridCategoryProvider (PropertyGridViewProvider prov, PropertyGridView grid, PGI.CategoryGridEntry entry)
			: base (prov, grid, entry)
		{
			this.entry = entry;
		}