Ejemplo n.º 1
0
        public static object EditValue(ComponentDesigner designer, object objectToChange, string propName)
        {
            PropertyDescriptor   prop    = TypeDescriptor.GetProperties(objectToChange)[propName];
            EditorServiceContext context = new EditorServiceContext(designer, prop);
            UITypeEditor         editor  = prop.GetEditor(typeof(UITypeEditor)) as UITypeEditor;
            object obj2 = prop.GetValue(objectToChange);
            object obj3 = editor.EditValue(context, context, obj2);

            if (obj3 != obj2)
            {
                try {
                    prop.SetValue(objectToChange, obj3);
                }
                catch (CheckoutException) {
                }
            }
            return(obj3);
        }
Ejemplo n.º 2
0
 public void InvokeColumnsDialog()
 {
     EditorServiceContext.EditValue(this._designer, base.Component, "Columns");
 }