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));
 }
Example #2
0
 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);
 }