public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if ((context != null) && (provider != null) && (value != null)) { IWindowsFormsEditorService svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (svc != null) { NhsDateEditor editor = new NhsDateEditor(); editor.Value = (NhsDate)value; svc.DropDownControl(editor); value = editor.Value; } } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if ((context != null) && (provider != null) && (value != null)) { IWindowsFormsEditorService svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (svc != null) { NhsDateEditor editor = new NhsDateEditor(); editor.Value = (NhsDate)value; svc.DropDownControl(editor); value = editor.Value; } } return(value); }