Exemple #1
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            if (context != null &&
                context.Instance != null &&
                provider != null)
            {
                IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

                if (edSvc != null)
                {
                    GenericParserStringUITypeEditor control = new GenericParserStringUITypeEditor(value);
                    edSvc.DropDownControl(control);
                    return(control.Value);
                }
            }

            return(value);
        }
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            if (context != null
               && context.Instance != null
               && provider != null)
            {

                IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

                if (edSvc != null)
                {
                    GenericParserStringUITypeEditor control = new GenericParserStringUITypeEditor(value);
                    edSvc.DropDownControl(control);
                    return control.Value;
                }
            }

            return value;
        }