public override PropertyDescriptorCollection GetProperties(Attribute[] attributes) { ArrayList props = new ArrayList(); foreach (XmlNode errorNode in errorNodes) { ArrayList attrs = new ArrayList(); // Add default attributes Category, TypeConverter and Description attrs.Add(new CategoryAttribute("WXS Attribute")); // Show file name editor attrs.Add(new EditorAttribute(typeof(MultiLineUITypeEditor), typeof(System.Drawing.Design.UITypeEditor))); // Make Attribute array Attribute[] attrArray = (Attribute[])attrs.ToArray(typeof(Attribute)); // Create and add PropertyDescriptor ErrorElementPropertyDescriptor pd = new ErrorElementPropertyDescriptor(wixFiles, errorNode, errorNode.Attributes["Id"].Value, attrArray); props.Add(pd); } PropertyDescriptor[] propArray = props.ToArray(typeof(PropertyDescriptor)) as PropertyDescriptor[]; return(new PropertyDescriptorCollection(propArray)); }
public override PropertyDescriptorCollection GetProperties(Attribute[] attributes) { ArrayList props = new ArrayList(); foreach(XmlNode errorNode in errorNodes) { ArrayList attrs = new ArrayList(); // Add default attributes Category, TypeConverter and Description attrs.Add(new CategoryAttribute("WXS Attribute")); // Show file name editor attrs.Add(new EditorAttribute(typeof(MultiLineUITypeEditor),typeof(System.Drawing.Design.UITypeEditor))); // Make Attribute array Attribute[] attrArray = (Attribute[])attrs.ToArray(typeof(Attribute)); // Create and add PropertyDescriptor ErrorElementPropertyDescriptor pd = new ErrorElementPropertyDescriptor(wixFiles, errorNode, errorNode.Attributes["Id"].Value, attrArray); props.Add(pd); } PropertyDescriptor[] propArray = props.ToArray(typeof(PropertyDescriptor)) as PropertyDescriptor[]; return new PropertyDescriptorCollection(propArray); }