private void BuildAttributes_CustomEventProperty() { UICustomEventEditor.DelegateAttribute delegateAttribute = new UICustomEventEditor.DelegateAttribute(this.MethodDelegate); this.oCustomAttributes = new AttributeCollection(new Attribute[] { delegateAttribute }); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null) { if (provider != null) { if (context.Instance != null) { if (this.m_MethodDelegate == null) { UICustomEventEditor.DelegateAttribute delegateAttribute = (UICustomEventEditor.DelegateAttribute)context.PropertyDescriptor.Attributes[typeof(UICustomEventEditor.DelegateAttribute)]; this.m_MethodDelegate = delegateAttribute.GetMethod; } if (this.m_sender == null) { this.m_sender = (context.PropertyDescriptor as CustomProperty.CustomPropertyDescriptor); } return(this.m_MethodDelegate(this.m_sender, null)); } } } return(base.EditValue(provider, RuntimeHelpers.GetObjectValue(value))); }
private void BuildAttributes_CustomEventProperty() { UICustomEventEditor.DelegateAttribute attr = new UICustomEventEditor.DelegateAttribute(MethodDelegate); oCustomAttributes = new AttributeCollection(new Attribute[] {attr}); }
private void BuildAttributes_CustomEventProperty() { UICustomEventEditor.DelegateAttribute attr = new UICustomEventEditor.DelegateAttribute(MethodDelegate); oCustomAttributes = new AttributeCollection(new Attribute[] { attr }); }