示例#1
0
        /// <summary>
        /// Updates panels from <see cref="PanelExGroup.panels">panels</see> from 0 to specified index.
        /// </summary>
        /// <param name="index">Determine lower index from which panels will be updated.</param>
        private void UpdatePositions()
        {
            for (int i = 0; i < panels.Count; i++)
            {
                PanelEx test = panels.Item(i);
                if (i == 0)
                {
                    this.panels.Item(i).Top = this.border;
                }
                else
                {
                    this.panels.Item(i).Top = this.panels.Item(i - 1).Bottom + this.border;
                }

                this.panels.Item(i).Left  = this.spacing;
                this.panels.Item(i).Width = this.Width - (2 * this.spacing);

                if (true == this.VScroll)
                {
                    this.panels.Item(i).Width -= SystemInformation.VerticalScrollBarWidth;
                }
            }
        }
示例#2
0
 /// <summary>
 /// Inserts a <see cref="PanelEx">PanelEx</see> at the specified position.
 /// </summary>
 /// <param name="index">The zero-based index at which <i>panel</i> should be inserted.</param>
 /// <param name="panel">The <see cref="PanelEx">PanelEx</see> to insert into the collection.</param>
 public void Insert(int index, PanelEx panel)
 {
     this.List.Insert(index, panel);
 }
示例#3
0
 /// <summary>
 /// Searches for the specified <see cref="PanelEx">PanelEx</see> and returns the zero-based index of the first occurrence.
 /// </summary>
 /// <param name="panel">The <see cref="PanelEx">PanelEx</see> to search for.</param>
 /// <returns></returns>
 public int IndexOf(PanelEx panel)
 {
     return(this.List.IndexOf(panel));
 }
示例#4
0
 /// <summary>
 /// Adds a <see cref="PanelEx">PanelEx</see> to the end of the collection.
 /// </summary>
 /// <param name="panel">The <see cref="PanelEx">PanelEx</see> to add.</param>
 public void Add(PanelEx panel)
 {
     this.List.Add(panel);
 }
示例#5
0
 /// <summary>
 /// Initialises a new <see cref="PanelEventArgs">PanelEventArgs</see>.
 /// </summary>
 /// <param name="sender">The originating <see cref="PanelEx">PanelEx</see>.</param>
 public PanelEventArgs(PanelEx sender)
 {
     this.panel = sender;
 }