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) { NhsTimeEditor editor = new NhsTimeEditor(); editor.Value = (NhsTime)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) { NhsTimeEditor editor = new NhsTimeEditor(); editor.Value = (NhsTime)value; svc.DropDownControl(editor); value = editor.Value; } } return(value); }