Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Director.HeaderListItem"/> class.
        /// </summary>
        /// <param name="_parent">_parent.</param>
        /// <param name="_header">_header.</param>
        /// <param name="_color">_color.</param>
        public HeaderListItem(HeaderList _parent, Header _header, Color _color)
        {
            ActiveHeader = _header;
            ParentList = _parent;

            // Set background color
            BackgroundColor = DefaultColor = _color;

            // Set height
            MinHeight = HeaderList.ROW_HEIGHT;

            // Horizontal resize true
            ExpandHorizontal = true;

            // No margins
            Margin = 0;

            // Init component
            _initializeComponents();
        }
Esempio n. 2
0
 /// <summary>
 /// Remove header.
 /// </summary>
 /// <param name="header"></param>
 public void RemoveHeader(Header header)
 {
     Headers.Remove(header);
     RefreshHeaderList();
 }
Esempio n. 3
0
 /// <summary>
 /// Create new header item.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void NewHeader_Clicked(object sender, EventArgs e)
 {
     Header NewHeader = new Header();
     Headers.Add(NewHeader);
     HeaderListItem NewHeaderListItem = new HeaderListItem(this, NewHeader,
         ((Headers.Count - 1)%2 == 0) ? Colors.White : Colors.LightGray);
     HeaderListBox.PackStart(NewHeaderListItem);
     HeaderListItems.Add(NewHeaderListItem);
 }
Esempio n. 4
0
 /// <summary>
 /// Overloaded constructor for creating header from parent.
 /// </summary>
 /// <param name="_parent">parent header</param>
 public Header(Header _parent)
 {
     this.Name = _parent.Name;
     this.Value = _parent.Value;
 }