public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc == null) { return(null); } using (FormatterSettingsForm form = new FormatterSettingsForm(value as RecordFormatterSettings)) { if (edSvc.ShowDialog(form) == DialogResult.OK) { return(form.FormatterSettings); } } return(value); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc == null) { return null; } using (FormatterSettingsForm form = new FormatterSettingsForm(value as RecordFormatterSettings)) { if (edSvc.ShowDialog(form) == DialogResult.OK) { return form.FormatterSettings; } } return value; }