public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
                if (editorService != null)
                {
                    if (_modalEditorPropertyEditorForm == null)
                    {
                        _modalEditorPropertyEditorForm = new ModalEditorPropertyEditorForm();
                    }
                    _modalEditorPropertyEditorForm.Start(editorService, value);
                    editorService.ShowDialog(_modalEditorPropertyEditorForm);
                    if (_modalEditorPropertyEditorForm.DialogResult == DialogResult.OK)
                    {
                        value = new ModalEditorProperty(_modalEditorPropertyEditorForm.SampleStringTextBox.Text, _modalEditorPropertyEditorForm.SampleBooleanCheckBox.Checked);
                    }
                    else
                    {
                        value = null;
                    }
                }
            }

            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 (_modalEditorPropertyEditorForm == null) _modalEditorPropertyEditorForm = new ModalEditorPropertyEditorForm();
                    _modalEditorPropertyEditorForm.Start(editorService, value);
                    editorService.ShowDialog(_modalEditorPropertyEditorForm);
                    if (_modalEditorPropertyEditorForm.DialogResult == DialogResult.OK)
                    {
                        value = new ModalEditorProperty(_modalEditorPropertyEditorForm.SampleStringTextBox.Text, _modalEditorPropertyEditorForm.SampleBooleanCheckBox.Checked);
                    }
                    else
                    {
                        value = null;
                    }
                }
            }

            return value;
        }