示例#1
0
 private void setAttrs(List<PropertyDescriptor> props, PropertySpec property)
 {
     ArrayList list = new ArrayList();
     if (property.Category != null)
     {
         list.Add(new CategoryAttribute(property.Category));
     }
     if (property.Description != null)
     {
         list.Add(new DescriptionAttribute(property.Description));
     }
     if (property.EditorTypeName != null)
     {
         list.Add(new EditorAttribute(property.EditorTypeName, typeof(UITypeEditor)));
     }
     if (property.ConverterTypeName != null)
     {
         list.Add(new TypeConverterAttribute(property.ConverterTypeName));
     }
     if (property.Attributes != null)
     {
         list.AddRange(property.Attributes);
     }
     Attribute[] attrs = (Attribute[]) list.ToArray(typeof(Attribute));
     PropertySpecDescriptor item = new PropertySpecDescriptor(property, this, property.Name, attrs);
     props.Add(item);
 }
示例#2
0
 public PropertySpecEventArgs(PropertySpec property, object val)
 {
     this.m_Property = property;
     this.m_Val = val;
 }