Example #1
0
        public override PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            ArrayList props = new ArrayList();

            foreach (XmlNode progressTextNode in progressTextNodes)
            {
                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
                ProgressTextElementPropertyDescriptor pd = new ProgressTextElementPropertyDescriptor(wixFiles, progressTextNode, progressTextNode.Attributes["Action"].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 progressTextNode in progressTextNodes) {
                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
                ProgressTextElementPropertyDescriptor pd = new ProgressTextElementPropertyDescriptor(wixFiles, progressTextNode, progressTextNode.Attributes["Action"].Value, attrArray);

                props.Add(pd);
            }

            PropertyDescriptor[] propArray = props.ToArray(typeof(PropertyDescriptor)) as PropertyDescriptor[];

            return new PropertyDescriptorCollection(propArray);
        }