| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /*******************************************************************************
- * 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
- {
- /// <summary>
- /// 类文件
- /// </summary>
- public class DockPaneCollection : ReadOnlyCollection<DockPane>
- {
- internal DockPaneCollection()
- : base(new List<DockPane>())
- {
- }
- 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);
- }
- }
- }
|