Пример #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;
        }
        private IList<string> AddCategories()
        {
            var categories = _Properties.GetMany<string>("CATEGORIES");
            categories.Add("Work");
            categories.Add("Personal");

            var property = new Property();
            property.Group = "CATEGORIES";
            property.SetValue(new string[] { "A", "Few", "More" });
            _Properties.Add(property);
            
            return categories;
        }
Пример #3
0
 private static void Read(XmlReader reader, Property element)
 {
     if (!reader.IsStartElement()) return;
     if (reader.IsEmptyElement) return;
     if (reader.Name != element.LocalName) return;
     if (!reader.Read()) return;
     string value = reader.Value;
     element.SetValue(value);
     reader.Read();
 }