Beispiel #1
0
            public override object EditValue(ITypeDescriptorContext context,
                IServiceProvider provider, object value)
            {
                IWindowsFormsEditorService wfes = provider.GetService(
                    typeof(IWindowsFormsEditorService)) as
                    IWindowsFormsEditorService;

                if (wfes != null)
                {
                    frmContrast _frmContrast = new frmContrast();

                    //				_frmContrast.trackBar1.Value = (int) value;
                    //				_frmContrast.BarValue = _frmContrast.trackBar1.Value;

                    _frmContrast.BarValue = (int)value;
                    _frmContrast._wfes = wfes;
                    _frmContrast.rearrange(2);

                    //				_frmContrast.BarValue = _frmContrast.trackBar1.Value;
                    //_frmContrast.imageListBox1.SelectedIndex =1+ (int)value;
                    wfes.DropDownControl(_frmContrast.imageListBox1);
                    value = _frmContrast.BarValue;

                }
                return value;
            }