本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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);
}
}
}
示例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;
}
示例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];
}
}
}
示例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();
}
}
示例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;
}
示例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;
}
}
示例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();
}
}
示例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) {
}
示例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));
}
}
示例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