public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { GoldEditor ge = new GoldEditor(); if (!ge.SetValues((string)value)) { throw new ArgumentException("Can not convert '" + (string)value + "' to type GoldEditor"); } return(ge); } return(base.ConvertFrom(context, culture, value)); }
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { GoldEditor ge = new GoldEditor(); if (!ge.SetValues((string)value)) throw new ArgumentException("Can not convert '" + (string)value + "' to type GoldEditor"); return ge; } return base.ConvertFrom(context, culture, value); }