public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService editorService = null;
            if (provider != null)
            {
                editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            }

            if (editorService != null)
            {
                TypeCodeSelectionControl selectionControl = new TypeCodeSelectionControl((List<TypeCodes>)value, editorService);
                editorService.DropDownControl(selectionControl);

                value = selectionControl.List;
            }

            return value;
        }
Пример #2
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService editorService = null;

            if (provider != null)
            {
                editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            }

            if (editorService != null)
            {
                TypeCodeSelectionControl selectionControl = new TypeCodeSelectionControl((List <TypeCodes>)value, editorService);
                editorService.DropDownControl(selectionControl);

                value = selectionControl.List;
            }

            return(value);
        }