/******************************************************************************* * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential * 类的信息: * 1.程序名称:DockPaneCollection.cs * 2.功能描述:类文件 * 编辑履历: * 作者 日期 版本 修改内容 * 陈晓野 2014/09/01 1.00 新建 *******************************************************************************/ using System.Collections.Generic; using System.Collections.ObjectModel; namespace Dongke.IBOSS.PRD.Basics.DockPanel { /// /// 类文件 /// public class DockPaneCollection : ReadOnlyCollection { internal DockPaneCollection() : base(new List()) { } internal int Add(DockPane pane) { if (Items.Contains(pane)) return Items.IndexOf(pane); Items.Add(pane); return Count - 1; } internal void AddAt(DockPane pane, int index) { if (index < 0 || index > Items.Count - 1) return; if (Contains(pane)) return; Items.Insert(index, pane); } internal void Dispose() { for (int i = Count - 1; i >= 0; i--) this[i].Close(); } internal void Remove(DockPane pane) { Items.Remove(pane); } } }