/// <summary> /// 添加panel /// </summary> /// <param name="panel"></param> public void AddPanel(CollapsiblePanel panel) { iIndex++; panel.TabIndex = iIndex; panel.LinkClick += new LinkLabelLinkClickedEventHandler(panel_LinkClick); panel.PanelStateChanged += new PanelStateChangedEventHandler(panel_PanelStateChanged); this.Controls.Add(panel); }
/// <summary> /// 添加panel /// </summary> /// <param name="panel"></param> public CollapsiblePanel AddPanel(string text, object tag) { iIndex++; CollapsiblePanel panel = new CollapsiblePanel(); panel.TitleText = text; panel.Tag = tag; panel.TabIndex = iIndex; panel.LinkClick += new LinkLabelLinkClickedEventHandler(panel_LinkClick); panel.PanelStateChanged += new PanelStateChangedEventHandler(panel_PanelStateChanged); this.Controls.Add(panel); return(panel); }
/// <summary> /// Searches for the specified <see cref="CollapsiblePanel">CollapsiblePanel</see> and returns the zero-based index of the first occurrence. /// </summary> /// <param name="panel">The <see cref="CollapsiblePanel">CollapsiblePanel</see> to search for.</param> /// <returns></returns> public int IndexOf(CollapsiblePanel panel) { return(this.List.IndexOf(panel)); }
/// <summary> /// Inserts a <see cref="CollapsiblePanel">CollapsiblePanel</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="CollapsiblePanel">CollapsiblePanel</see> to insert into the collection.</param> public void Insert(int index, CollapsiblePanel panel) { this.List.Insert(index, panel); }
/// <summary> /// Adds a <see cref="CollapsiblePanel">CollapsiblePanel</see> to the end of the collection. /// </summary> /// <param name="panel">The <see cref="CollapsiblePanel">CollapsiblePanel</see> to add.</param> public void Add(CollapsiblePanel panel) { this.List.Add(panel); }
/// <summary> /// Initialises a new <see cref="PanelEventArgs">PanelEventArgs</see>. /// </summary> /// <param name="sender">The originating <see cref="CollapsiblePanel">CollapsiblePanel</see>.</param> public PanelEventArgs(CollapsiblePanel sender) { this.panel = sender; }