예제 #1
0
        internal EditSession(Widget container, ITypeDescriptorContext context, IPropertyEditor currentEditor)
        {
            this.context       = context;
            this.container     = container;
            this.currentEditor = currentEditor;

            currentEditor.Initialize(this);
            if (Instance != null)
            {
                currentEditor.Value = context.PropertyDescriptor.GetValue(Instance);
            }

            currentEditor.ValueChanged += OnValueChanged;
        }
        public EditSession(Gtk.Widget container, object instance, PropertyDescriptor property, IPropertyEditor currentEditor)
        {
            this.property      = property;
            this.obj           = instance;
            this.container     = container;
            this.currentEditor = currentEditor;

            currentEditor.Initialize(this);
            if (instance != null)
            {
                currentEditor.Value = property.GetValue(instance);
            }

            currentEditor.ValueChanged += OnValueChanged;
        }
예제 #3
0
        public EditSession StartEditing(Gdk.Rectangle cell_area, StateType state)
        {
            IPropertyEditor ed = CreateEditor(cell_area, state);

            if (ed == null)
            {
                return(null);
            }
            ed.Initialize(property);
            if (obj != null)
            {
                ed.AttachObject(obj);
                ed.Value = property.GetValue(obj);
            }
            return(new EditSession(container, obj, property, ed));
        }
예제 #4
0
		public EditSession (Gtk.Widget container, object instance, PropertyDescriptor property, IPropertyEditor currentEditor)
		{
			this.property = property;
			this.obj = instance;
			this.container = container;
			this.currentEditor = currentEditor;
			
			currentEditor.Initialize (this);
			if (instance != null)
				currentEditor.Value = property.GetValue (instance);
			
			currentEditor.ValueChanged += OnValueChanged;
		}
		internal EditSession (Widget container, ITypeDescriptorContext context, IPropertyEditor currentEditor)
		{
			this.context = context;
			this.container = container;
			this.currentEditor = currentEditor;
			
			currentEditor.Initialize (this);
			if (Instance != null)
				currentEditor.Value = context.PropertyDescriptor.GetValue (Instance);
			
			currentEditor.ValueChanged += OnValueChanged;
		}