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

            if (wfes != null)
            {
                Vector2EditorControl uc1 = new Vector2EditorControl((Vector2)value);
                wfes.DropDownControl(uc1);
                value = uc1.Value;
            }
            return value;
        }
Пример #2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService wfes =
                provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;

            if (wfes != null)
            {
                Vector2EditorControl uc1 = new Vector2EditorControl((Vector2)value);
                wfes.DropDownControl(uc1);
                value = uc1.Value;
            }
            return(value);
        }