Example #1
0
        /// <summary>
        /// Create a new instance of the <see cref="EnumerationBoxController"/> class initializing
        /// the object state
        /// </summary>
        /// <param name="element">The element representig the related <see cref="EnumerationBox"/></param>
        /// <param name="enabled">A boolean value, ComboBox is enabled if true, disabled otherwise</param>
        public EnumerationBoxController(EnumerationBox element, bool enabled)
            : base(enabled)
        {
            this.element = element;

            combo = new ComboBox();
            foreach (String item in element.Values)
            {
                combo.Items.Add(item);
            }

            combo.SelectedIndex = element.SelectedIndex;
            combo.Font          = new Font("Tahoma", 8, FontStyle.Regular);
            combo.Enabled       = enabled;

            Content     = combo;
            Title       = element.Name;
            Description = element.Description;
        }
Example #2
0
 /// <summary>
 /// Overloaded constructor
 /// </summary>
 /// <param name="element">The element representig the related <see cref="EnumerationBox"/></param>
 public EnumerationBoxController(EnumerationBox element)
     : this(element, true)
 {
 }