Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyRowLabel"/> class.
 /// </summary>
 /// <param name="parent">Parent control.</param>
 public PropertyRowLabel(PropertyRow parent)
     : base(parent)
 {
     AutoSizeToContents = false;
     Alignment = Pos.Left | Pos.CenterV;
     m_PropertyRow = parent;
 }
Ejemplo 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, Property.PropertyBase prop, string value = "")
        {
            PropertyRow row = new PropertyRow(this, prop);

            row.Label         = label;
            row.ValueChanged += OnRowValueChanged;

            prop.SetValue(value, true);

            m_SplitterBar.BringToFront();
            return(row);
        }
Ejemplo 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.Base 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;
        }
Ejemplo n.º 4
0
        /*public Base Add(string label, object value)
         * {
         *      switch (value.GetType()) {
         *      //case typeof()
         *      }
         *      PropertyRow<T> row = new PropertyRow<T>(this, prop);
         *      row.Dock = Pos.Top;
         *      row.Label = label;
         *      row.ValueChanged += OnRowValueChanged;
         *
         *      prop.SetValue(value, true);
         *
         *      // m_SplitterBar.BringToFront();
         *      return row;
         * }*/

        /// <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 <T> Add <T>(string label, Property.Base <T> prop, T value = default(T))
        {
            PropertyRow <T> row = new PropertyRow <T>(this, prop);

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

            prop.SetValue(value, true);

            // m_SplitterBar.BringToFront();
            return(row);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyRowLabel"/> class.
 /// </summary>
 /// <param name="parent">Parent control.</param>
 public PropertyRowLabel(PropertyRow parent)
     : base(parent)
 {
     Alignment = Pos.Left | Pos.CenterV;
     m_PropertyRow = parent;
 }