예제 #1
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.Control 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);
        }
예제 #2
0
파일: PropertyRow.cs 프로젝트: tritao/flood
        /// <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(Control parent, Property.Control 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;
        }
예제 #3
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(Control parent, Property.Control 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;
        }