public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { this.edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (this.edSvc == null) { return(value); } ClilocBrowser clilocBrowser = new ClilocBrowser(); if (this.edSvc.ShowDialog((Form)clilocBrowser) == DialogResult.OK) { return((object)clilocBrowser.ClilocID); } return(value); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null) { edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); } if (edSvc == null) { return(value); } ClilocBrowser clilocBrowser = new ClilocBrowser(); return(edSvc.ShowDialog(clilocBrowser) == DialogResult.OK ? clilocBrowser.ClilocID : value); }