public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null) { editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (editorService != null) { if (_dropDownEditorPropertyEditorControl == null) _dropDownEditorPropertyEditorControl = new DropDownEditorPropertyEditorControl(); _dropDownEditorPropertyEditorControl.Start(editorService, value); editorService.DropDownControl(_dropDownEditorPropertyEditorControl); return new DropDownEditorProperty(_dropDownEditorPropertyEditorControl.SampleStringTextBox.Text, _dropDownEditorPropertyEditorControl.SampleBooleanCheckBox.Checked); } } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (provider != null) { _editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (_editorService != null) { if (_dropDownEditorPropertyEditorControl == null) { _dropDownEditorPropertyEditorControl = new DropDownEditorPropertyEditorControl(); } _dropDownEditorPropertyEditorControl.Start(_editorService, value); _editorService.DropDownControl(_dropDownEditorPropertyEditorControl); return(new DropDownEditorProperty(_dropDownEditorPropertyEditorControl.SampleStringTextBox.Text, _dropDownEditorPropertyEditorControl.SampleBooleanCheckBox.Checked)); } } return(value); }