public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value != null && value.GetType() == typeof(string))
{
for (int i = 0; i < s_types.Length; i++)
{
if (s_types[i].ToString().Equals(value))
{
return s_types[i];
}
}
return typeof(string);
}
return base.ConvertFrom(context, culture, value);
}