Example #1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService service1 = null;

            if (((context != null) && (context.Instance != null)) && (provider != null))
            {
                service1 = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
                if (service1 != null)
                {
                    SpecialInstance(context.Instance);
                    if (_dropDownEditorControl == null)
                    {
                        _dropDownEditorControl = new DropDownEditorControl();
                    }
                    _dropDownEditorControl.SetEditValue(value);
                    service1.DropDownControl(_dropDownEditorControl);
                    return(_dropDownEditorControl.GetEditValue());
                }
            }
            return(value);
        }
Example #2
0
 public DropDownEditor(DropDownEditorControl dropDownEditorControl)
     : this()
 {
     _dropDownEditorControl = dropDownEditorControl;
 }