示例#1
0
 private void BuildAttributes_CustomEventProperty()
 {
     UICustomEventEditor.DelegateAttribute delegateAttribute = new UICustomEventEditor.DelegateAttribute(this.MethodDelegate);
     this.oCustomAttributes = new AttributeCollection(new Attribute[]
     {
         delegateAttribute
     });
 }
示例#2
0
 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)));
 }
示例#3
0
 private void BuildAttributes_CustomEventProperty()
 {
     UICustomEventEditor.DelegateAttribute attr = new UICustomEventEditor.DelegateAttribute(MethodDelegate);
     oCustomAttributes = new AttributeCollection(new Attribute[] {attr});
 }
示例#4
0
 private void BuildAttributes_CustomEventProperty()
 {
     UICustomEventEditor.DelegateAttribute attr = new UICustomEventEditor.DelegateAttribute(MethodDelegate);
     oCustomAttributes = new AttributeCollection(new Attribute[] { attr });
 }