Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyRow"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        /// <param name="prop">Property control associated with this row.</param>
        public PropertyRow(ControlBase parent, Property.PropertyBase prop)
            : base(parent)
        {
            Padding = new Padding(2, 2, 2, 2);

            m_Label           = new PropertyRowLabel(this);
            m_Label.Alignment = Alignment.Left | Alignment.Top;

            m_Property               = prop;
            m_Property.Parent        = this;
            m_Property.ValueChanged += OnValueChanged;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds a new property row.
        /// </summary>
        /// <param name="label">Property name.</param>
        /// <param name="prop">Property control.</param>
        /// <param name="value">Initial value.</param>
        /// <returns>Newly created row.</returns>
        public PropertyRow Add(String label, PropertyBase prop, String value="")
        {
            PropertyRow row = new PropertyRow(this, prop);
            row.Dock = Pos.Top;
            row.Label = label;
            row.ValueChanged += OnRowValueChanged;

            prop.SetValue(value, true);

            m_SplitterBar.BringToFront();
            return row;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Adds a new property row.
        /// </summary>
        /// <param name="label">Property name.</param>
        /// <param name="prop">Property control.</param>
        /// <param name="value">Initial value.</param>
        /// <returns>Newly created row.</returns>
        public PropertyRow Add(string label, Property.PropertyBase prop, string value = "")
        {
            PropertyRow row = new PropertyRow(this, prop);

            row.Dock          = Pos.Top;
            row.Label         = label;
            row.ValueChanged += onRowValueChanged;

            prop.setValue(value, true);

            splitterBar.BringToFront();
            return(row);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyRow"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        /// <param name="prop">Property control associated with this row.</param>
        public PropertyRow(ControlBase parent, PropertyBase prop)
            : base(parent)
        {
            PropertyRowLabel label = new PropertyRowLabel(this);
            label.Dock = Pos.Left;
            label.Alignment = Pos.Left | Pos.Top;
            label.Margin = new Margin(2, 2, 0, 0);
            m_Label = label;

            m_Property = prop;
            m_Property.Parent = this;
            m_Property.Dock = Pos.Fill;
            m_Property.ValueChanged += OnValueChanged;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyRow"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        /// <param name="prop">Property control associated with this row.</param>
        public PropertyRow(ControlBase parent, Property.PropertyBase prop)
            : base(parent)
        {
            PropertyRowLabel label = new PropertyRowLabel(this);

            label.Dock      = Pos.Left;
            label.Alignment = Pos.Left | Pos.Top;
            label.Margin    = new Margin(2, 2, 0, 0);
            this.label      = label;

            property               = prop;
            property.Parent        = this;
            property.Dock          = Pos.Fill;
            property.ValueChanged += onValueChanged;
        }