當前位置: 首頁>>代碼示例>>C#>>正文


C# PropertyGridInternal.GridEntry類代碼示例

本文整理匯總了C#中System.Windows.Forms.PropertyGridInternal.GridEntry的典型用法代碼示例。如果您正苦於以下問題:C# GridEntry類的具體用法?C# GridEntry怎麽用?C# GridEntry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GridEntry類屬於System.Windows.Forms.PropertyGridInternal命名空間,在下文中一共展示了GridEntry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GridEntry

		// Cannot use one PropertyDescriptor for all owners, because the
		// propertydescriptors might have different Invokees. Check
		// ReflectionPropertyDescriptor.GetInvokee and how it's used.
		//
		public GridEntry (PropertyGrid propertyGrid, PropertyDescriptor[] properties, 
				  GridEntry parent) : this (propertyGrid, parent) 
		{
			if (properties == null || properties.Length == 0)
				throw new ArgumentNullException ("prop_desc");
			property_descriptors = properties;
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:11,代碼來源:GridEntry.cs

示例2: CategoryGridEntry

 public CategoryGridEntry(PropertyGrid ownerGrid, GridEntry peParent, string name, GridEntry[] childGridEntries) : base(ownerGrid, peParent)
 {
     this.name = name;
     if (categoryStates == null)
     {
         categoryStates = new Hashtable();
     }
     lock (categoryStates)
     {
         if (!categoryStates.ContainsKey(name))
         {
             categoryStates.Add(name, true);
         }
     }
     this.IsExpandable = true;
     for (int i = 0; i < childGridEntries.Length; i++)
     {
         childGridEntries[i].ParentGridEntry = this;
     }
     base.ChildCollection = new GridEntryCollection(this, childGridEntries);
     lock (categoryStates)
     {
         this.InternalExpanded = (bool) categoryStates[name];
     }
     this.SetFlag(0x40, true);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:26,代碼來源:CategoryGridEntry.cs

示例3: CategoryGridEntry

        public CategoryGridEntry(PropertyGrid ownerGrid, GridEntry peParent,string name, GridEntry[] childGridEntries)
        : base(ownerGrid, peParent) {
            this.name = name;

#if DEBUG
            for (int n = 0;n < childGridEntries.Length; n++) {
                Debug.Assert(childGridEntries[n] != null, "Null item in category subproperty list");
            }
#endif
            if (categoryStates == null) {
                categoryStates = new Hashtable();
            }

            lock (categoryStates) {
                if (!categoryStates.ContainsKey(name)) {
                    categoryStates.Add(name, true);
                }
            }

            this.IsExpandable = true;
            
            for (int i = 0; i < childGridEntries.Length; i++) {
                childGridEntries[i].ParentGridEntry = this;
            }
            
            this.ChildCollection = new GridEntryCollection(this, childGridEntries);

            lock (categoryStates) {
                this.InternalExpanded = (bool)categoryStates[name];
            }

            this.SetFlag(GridEntry.FLAG_LABEL_BOLD,true);
        }
開發者ID:JianwenSun,項目名稱:cc,代碼行數:33,代碼來源:CategoryGridEntry.cs

示例4: GetChildValueOwner

 public override object GetChildValueOwner(GridEntry childEntry)
 {
     if (!this.mergedPd.PropertyType.IsValueType && ((this.Flags & 0x200) == 0))
     {
         return this.mergedPd.GetValues(this.objs);
     }
     return base.GetChildValueOwner(childEntry);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:8,代碼來源:MultiPropertyDescriptorGridEntry.cs

示例5: CategorizePropEntries

 internal void CategorizePropEntries()
 {
     if (this.Children.Count > 0)
     {
         GridEntry[] dest = new GridEntry[this.Children.Count];
         this.Children.CopyTo(dest, 0);
         if ((base.PropertySort & PropertySort.Categorized) != PropertySort.NoSort)
         {
             Hashtable hashtable = new Hashtable();
             for (int i = 0; i < dest.Length; i++)
             {
                 GridEntry entry = dest[i];
                 if (entry != null)
                 {
                     string propertyCategory = entry.PropertyCategory;
                     ArrayList list = (ArrayList) hashtable[propertyCategory];
                     if (list == null)
                     {
                         list = new ArrayList();
                         hashtable[propertyCategory] = list;
                     }
                     list.Add(entry);
                 }
             }
             ArrayList list2 = new ArrayList();
             IDictionaryEnumerator enumerator = hashtable.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 ArrayList list3 = (ArrayList) enumerator.Value;
                 if (list3 != null)
                 {
                     string key = (string) enumerator.Key;
                     if (list3.Count > 0)
                     {
                         GridEntry[] array = new GridEntry[list3.Count];
                         list3.CopyTo(array, 0);
                         try
                         {
                             list2.Add(new CategoryGridEntry(base.ownerGrid, this, key, array));
                             continue;
                         }
                         catch
                         {
                             continue;
                         }
                     }
                 }
             }
             dest = new GridEntry[list2.Count];
             list2.CopyTo(dest, 0);
             StringSorter.Sort(dest);
             base.ChildCollection.Clear();
             base.ChildCollection.AddRange(dest);
         }
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:56,代碼來源:SingleSelectRootGridEntry.cs

示例6: SingleSelectRootGridEntry

 internal SingleSelectRootGridEntry(PropertyGridView gridEntryHost, object value, GridEntry parent, IServiceProvider baseProvider, IDesignerHost host, PropertyTab tab, PropertySort sortType) : base(gridEntryHost.OwnerGrid, parent)
 {
     this.host = host;
     this.gridEntryHost = gridEntryHost;
     this.baseProvider = baseProvider;
     this.tab = tab;
     this.objValue = value;
     this.objValueClassName = TypeDescriptor.GetClassName(this.objValue);
     this.IsExpandable = true;
     base.PropertySort = sortType;
     this.InternalExpanded = true;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:12,代碼來源:SingleSelectRootGridEntry.cs

示例7: Dispose

 protected virtual void Dispose(bool disposing) {
     if (disposing) {
         if (owner != null && entries != null) {
             for (int i = 0; i < entries.Length; i++) {
                 if (entries[i] != null) {
                     ((GridEntry)entries[i]).Dispose();
                     entries[i] = null;
                 }
             }
             entries = new GridEntry[0];
         }
     }
 }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:13,代碼來源:GridEntryCollection.cs

示例8: AddRange

 public void AddRange(GridEntry[] value) {
     if (value == null) {
         throw new ArgumentNullException("value");
     }
     if (entries != null) {
         GridEntry[] newArray = new GridEntry[entries.Length + value.Length];
         entries.CopyTo(newArray, 0);
         value.CopyTo(newArray, entries.Length);
         entries = newArray;
     }
     else {
         entries = (GridEntry[])value.Clone();
     }
 }                                       
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:14,代碼來源:GridEntryCollection.cs

示例9: SingleSelectRootGridEntry

        internal SingleSelectRootGridEntry(PropertyGridView gridEntryHost, object value, GridEntry parent, IServiceProvider baseProvider, IDesignerHost host, PropertyTab tab, PropertySort sortType)
        : base(gridEntryHost.OwnerGrid, parent) {
            Debug.Assert(value != null,"Can't browse a null object!");
            this.host = host;
            this.gridEntryHost = gridEntryHost;
            this.baseProvider = baseProvider;
            this.tab = tab;
            this.objValue = value;
            this.objValueClassName = TypeDescriptor.GetClassName(this.objValue);

            this.IsExpandable = true;
            // default to categories
            this.PropertySort = sortType;
            this.InternalExpanded = true;
        }
開發者ID:JianwenSun,項目名稱:cc,代碼行數:15,代碼來源:SingleSelectRootGridEntry.cs

示例10: GridEntry

 protected GridEntry(PropertyGrid owner, GridEntry peParent)
 {
     this.parentPE = peParent;
     this.ownerGrid = owner;
     if (peParent != null)
     {
         this.propertyDepth = peParent.PropertyDepth + 1;
         this.PropertySort = peParent.PropertySort;
         if (peParent.ForceReadOnly)
         {
             this.flags |= 0x400;
         }
     }
     else
     {
         this.propertyDepth = -1;
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:18,代碼來源:GridEntry.cs

示例11: AddRange

 public void AddRange(GridEntry[] value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     if (base.entries != null)
     {
         GridEntry[] array = new GridEntry[base.entries.Length + value.Length];
         base.entries.CopyTo(array, 0);
         value.CopyTo(array, base.entries.Length);
         base.entries = array;
     }
     else
     {
         base.entries = (GridEntry[]) value.Clone();
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:18,代碼來源:GridEntryCollection.cs

示例12: NotifyChildValue

 internal override bool NotifyChildValue(GridEntry pe, int type)
 {
     bool flag = false;
     IDesignerHost designerHost = this.DesignerHost;
     DesignerTransaction transaction = null;
     if (designerHost != null)
     {
         transaction = designerHost.CreateTransaction();
     }
     try
     {
         flag = base.NotifyChildValue(pe, type);
     }
     finally
     {
         if (transaction != null)
         {
             transaction.Commit();
         }
     }
     return flag;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:22,代碼來源:MultiPropertyDescriptorGridEntry.cs

示例13: ImmutablePropertyDescriptorGridEntry

 internal ImmutablePropertyDescriptorGridEntry(PropertyGrid ownerGrid, GridEntry peParent, PropertyDescriptor propInfo, bool hide)
 : base(ownerGrid, peParent, propInfo, hide) {
 }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:3,代碼來源:ImmutablePropertyDescriptorGridEntry.cs

示例14: PaintValue

 public override void PaintValue(object val, Graphics g, Rectangle rect, Rectangle clipRect, GridEntry.PaintValueFlags paintFlags)
 {
     base.PaintValue(val, g, rect, clipRect, paintFlags & ~GridEntry.PaintValueFlags.DrawSelected);
     if (base.parentPE.GetChildIndex(this) > 0)
     {
         g.DrawLine(SystemPens.Control, (int) (rect.X - 2), (int) (rect.Y - 1), (int) (rect.Width + 1), (int) (rect.Y - 1));
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:8,代碼來源:CategoryGridEntry.cs

示例15: PropertyDescriptorGridEntry

 internal PropertyDescriptorGridEntry(PropertyGrid ownerGrid, GridEntry peParent, System.ComponentModel.PropertyDescriptor propInfo, bool hide) : base(ownerGrid, peParent)
 {
     this.parensAroundName = 0xff;
     this.activeXHide = hide;
     this.Initialize(propInfo);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:6,代碼來源:PropertyDescriptorGridEntry.cs


注:本文中的System.Windows.Forms.PropertyGridInternal.GridEntry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。