本文整理汇总了C#中System.Windows.Forms.PropertyGridInternal.GridEntry类的典型用法代码示例。如果您正苦于以下问题:C# GridEntry类的具体用法?C# GridEntry怎么用?C# GridEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridEntry类属于System.Windows.Forms.PropertyGridInternal命名空间,在下文中一共展示了GridEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: NotifyParentChange
protected virtual void NotifyParentChange(GridEntry ge)
{
while (((ge != null) && (ge is PropertyDescriptorGridEntry)) && ((PropertyDescriptorGridEntry) ge).propertyInfo.Attributes.Contains(NotifyParentPropertyAttribute.Yes))
{
object valueOwner = ge.GetValueOwner();
bool isValueType = valueOwner.GetType().IsValueType;
while ((!(ge is PropertyDescriptorGridEntry) || isValueType) ? valueOwner.Equals(ge.GetValueOwner()) : (valueOwner == ge.GetValueOwner()))
{
ge = ge.ParentGridEntry;
if (ge == null)
{
break;
}
}
if (ge != null)
{
valueOwner = ge.GetValueOwner();
IComponentChangeService componentChangeService = this.ComponentChangeService;
if (componentChangeService != null)
{
componentChangeService.OnComponentChanging(valueOwner, ((PropertyDescriptorGridEntry) ge).propertyInfo);
componentChangeService.OnComponentChanged(valueOwner, ((PropertyDescriptorGridEntry) ge).propertyInfo, null, null);
}
ge.ClearCachedValues(false);
PropertyGridView gridEntryHost = this.GridEntryHost;
if (gridEntryHost != null)
{
gridEntryHost.InvalidateGridEntryValue(ge);
}
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:PropertyDescriptorGridEntry.cs
示例17: CategorizePropEntries
internal void CategorizePropEntries() {
if (Children.Count > 0) {
GridEntry[] childEntries = new GridEntry[this.Children.Count];
this.Children.CopyTo(childEntries, 0);
if ((this.PropertySort & PropertySort.Categorized) != 0) {
// first, walk through all the entires and
// group them by their category by adding
// them to a hashtable of arraylists.
//
Hashtable bins = new Hashtable();
for (int i = 0; i < childEntries.Length; i++) {
GridEntry pe = childEntries[i];
Debug.Assert(pe != null);
if (pe != null) {
string category = pe.PropertyCategory;
ArrayList bin = (ArrayList)bins[category];
if (bin == null) {
bin = new ArrayList();
bins[category] = bin;
}
bin.Add(pe);
}
}
// now walk through the hashtable
// and create a categorygridentry for each
// category that holds all the properties
// of that category.
//
ArrayList propList = new ArrayList();
IDictionaryEnumerator enumBins = (IDictionaryEnumerator)bins.GetEnumerator();
while (enumBins.MoveNext()) {
ArrayList bin = (ArrayList)enumBins.Value;
if (bin != null) {
string category = (string)enumBins.Key;
if (bin.Count > 0) {
GridEntry[] rgpes = new GridEntry[bin.Count];
bin.CopyTo(rgpes, 0);
try {
propList.Add(new CategoryGridEntry(this.ownerGrid, this, category, rgpes));
}
catch {
}
}
}
}
childEntries = new GridEntry[propList.Count];
propList.CopyTo(childEntries, 0);
StringSorter.Sort(childEntries);
ChildCollection.Clear();
ChildCollection.AddRange(childEntries);
}
}
}
开发者ID:JianwenSun,项目名称:cc,代码行数:60,代码来源:SingleSelectRootGridEntry.cs
示例18: UpdateSelection
internal void UpdateSelection() {
if (!GetFlag(PropertiesChanged)) {
return;
}
if (viewTabs == null) {
return;
}
string tabName = viewTabs[selectedViewTab].TabName + propertySortValue.ToString();
if (viewTabProps != null && viewTabProps.ContainsKey(tabName)) {
peMain = (GridEntry)viewTabProps[tabName];
if (peMain != null) {
peMain.Refresh();
}
}
else {
if (currentObjects != null && currentObjects.Length > 0) {
peMain = (GridEntry)GridEntry.Create(gridView, currentObjects, new PropertyGridServiceProvider(this), designerHost, this.SelectedTab, propertySortValue);
}
else {
peMain = null;
}
if (peMain == null) {
currentPropEntries = new GridEntryCollection(null, new GridEntry[0]);
gridView.ClearProps();
return;
}
if (BrowsableAttributes != null) {
peMain.BrowsableAttributes = BrowsableAttributes;
}
if (viewTabProps == null) {
viewTabProps = new Hashtable();
}
viewTabProps[tabName] = peMain;
}
// get entries.
currentPropEntries = peMain.Children;
peDefault = peMain.DefaultChild;
gridView.Invalidate();
}
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:48,代码来源:PropertyGrid.cs
示例19: OnSelectedGridItemChanged
internal void OnSelectedGridItemChanged(GridEntry oldEntry, GridEntry newEntry) {
OnSelectedGridItemChanged(new SelectedGridItemChangedEventArgs(oldEntry, newEntry));
}
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:3,代码来源:PropertyGrid.cs
示例20: NotifyChildValue
/// <include file='doc\GridEntry.uex' path='docs/doc[@for="GridEntry.NotifyChildValue"]/*' />
/// <devdoc>
/// Sends a notify message to the child GridEntry, and returns the success result
/// </devdoc>
internal virtual bool NotifyChildValue(GridEntry pe, int type) {
return pe.NotifyValueGivenParent(pe.GetValueOwner(),type);
}
开发者ID:JianwenSun,项目名称:cc,代码行数:8,代码来源:GridEntry.cs
注:本文中的System.Windows.Forms.PropertyGridInternal.GridEntry类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论