public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
if (context != null
&& context.Instance != null
&& provider != null)
{
var edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
if (edSvc != null)
{
var e = (Enum)Convert.ChangeType(value, context.PropertyDescriptor.PropertyType);
this.flagEnumCB.EnumValue = e;
edSvc.DropDownControl(this.flagEnumCB);
return this.flagEnumCB.EnumValue;
}
}
return null;
}