public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { CustomChoices.CustomChoicesAttributeList customChoicesAttributeList = (CustomChoices.CustomChoicesAttributeList)context.PropertyDescriptor.Attributes[typeof(CustomChoices.CustomChoicesAttributeList)]; if (this.oChoices != null) { return(this.oChoices.Values); } return(base.GetStandardValues(context)); }
private void BuildAttributes_CustomChoices() { if (this.oChoices != null) { CustomChoices.CustomChoicesAttributeList value = new CustomChoices.CustomChoicesAttributeList(this.oChoices.Items); Attribute[] attributes = (Attribute[])new ArrayList { value }.ToArray(typeof(Attribute)); this.oCustomAttributes = new AttributeCollection(attributes); } }
private void BuildAttributes_CustomChoices() { if (oChoices != null) { CustomChoices.CustomChoicesAttributeList list = new CustomChoices.CustomChoicesAttributeList(oChoices.Items); ArrayList attrs = new ArrayList(); Attribute[] attrArray; attrs.Add(list); attrArray = (System.Attribute[])attrs.ToArray(typeof(Attribute)); oCustomAttributes = new AttributeCollection(attrArray); } }
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { CustomChoices.CustomChoicesAttributeList customChoicesAttributeList = (CustomChoices.CustomChoicesAttributeList)context.PropertyDescriptor.Attributes[typeof(CustomChoices.CustomChoicesAttributeList)]; if (this.oChoices != null) { return(true); } bool result; if (customChoicesAttributeList != null) { this.oChoices = customChoicesAttributeList; result = true; } else { result = false; } return(result); }
private void BuildAttributes_CustomChoices() { if (oChoices != null) { CustomChoices.CustomChoicesAttributeList list = new CustomChoices.CustomChoicesAttributeList(oChoices.Items); ArrayList attrs = new ArrayList(); Attribute[] attrArray; attrs.Add(list); attrArray = (System.Attribute[]) attrs.ToArray(typeof(Attribute)); oCustomAttributes = new AttributeCollection(attrArray); } }
public CustomChoicesTypeConverter() { this.oChoices = null; }