Esempio n. 1
0
 /// <summary>
 /// Removes the specified StatusBarPanel from the collection.
 /// </summary>
 /// <param name="value">The StatusBarPanel representing the panel to remove from the collection.</param>
 public virtual void Remove(StatusBarPanel value)
 {
     if (value == null)
     {
         throw new ArgumentNullException();
     }
     panelList.Remove(value);
     parent.Invalidate();
 }
Esempio n. 2
0
            /// <summary>
            /// Adds a StatusBarPanel with the specified text to the collection.
            /// </summary>
            /// <param name="text">The text for the StatusBarPanel that is being added.</param>
            /// <returns>A StatusBarPanel that represents the panel that was added to the collection.</returns>
            public virtual StatusBarPanel Add(string text)
            {
                StatusBarPanel statusBarPanel = new StatusBarPanel();

                statusBarPanel.Text = text;
                parent.Invalidate();
                panelList.Add(statusBarPanel);
                return(statusBarPanel);
            }
Esempio n. 3
0
            /// <summary>
            /// Adds a StatusBarPanel to the collection.
            /// </summary>
            /// <param name="value">A StatusBarPanel that represents the panel to add to the collection.</param>
            /// <returns>The zero-based index of the item in the collection.</returns>
            public virtual int Add(StatusBarPanel value)
            {
                if (value == null)
                {
                    throw new ArgumentNullException("StatusBarPanel", "no valid object passed");
                }
                StatusBarPanel statusBarPanel = value;

                statusBarPanel.parent = parent;
                parent.Invalidate();
                return(panelList.Add(value));
            }
Esempio n. 4
0
 /// <summary>
 /// Removes the StatusBarPanel located at the specified index within the collection.
 /// </summary>
 /// <param name="index">The zero-based index of the item to remove.</param>
 /// <remarks>
 /// When you remove a panel from the collection, the indexes change for subsequent panels in the collection.
 /// All information about the removed panel is deleted. You can use this method to remove a specific panel
 /// from the list by specifying the index of the panel to remove from the collection. To specify the panel
 /// to remove instead of the index to the panel, use the Remove method. To remove all panels from the
 /// StatusBarEx control, use the Clear method.
 /// </remarks>
 public void RemoveAt(int index)
 {
     if (index >= 0 && index < panelList.Count)
     {
         StatusBarPanel StatusBarPanel = (StatusBarPanel)panelList[index];
         panelList.RemoveAt(index);
         parent.Invalidate();
     }
     else
     {
         throw new ArgumentOutOfRangeException("index");
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Inserts the specified StatusBarPanel into the collection at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index location where the panel is inserted.</param>
 /// <param name="value">A StatusBarPanel representing the panel to insert.</param>
 public virtual void Insert(int index, StatusBarPanel value)
 {
     if (value == null)
     {
         throw new ArgumentNullException();
     }
     if (index < 0 || index > panelList.Count)
     {
         throw new ArgumentOutOfRangeException();
     }
     value.parent = this.parent;
     panelList.Insert(index, value);
     parent.Invalidate();
 }
Esempio n. 6
0
 /// <summary>
 /// Returns the index within the collection of the specified panel.
 /// </summary>
 /// <param name="value">The StatusBarPanel object to locate in the collection.</param>
 /// <returns>The zero-based index where the panel is located within the collection; otherwise, negative one (-1).</returns>
 public int IndexOf(StatusBarPanel value)
 {
     return(panelList.IndexOf(value));
 }
Esempio n. 7
0
 /// <summary>
 /// Determines whether the specified panel is located within the collection.
 /// </summary>
 /// <param name="panel">The StatusBarPanel to locate in the collection.</param>
 /// <returns>true if the panel is located within the collection; otherwise, false.</returns>
 public bool Contains(StatusBarPanel panel)
 {
     return(panelList.Contains(panel));
 }