/******************************************************************************* * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential * 类的信息: * 1.程序名称:DockWindowCollection.cs * 2.功能描述:类文件 * 编辑履历: * 作者 日期 版本 修改内容 * 陈晓野 2014/09/01 1.00 新建 *******************************************************************************/ using System; using System.Collections.Generic; using System.Collections.ObjectModel; namespace Dongke.IBOSS.PRD.Basics.DockPanel { public class DockWindowCollection : ReadOnlyCollection { internal DockWindowCollection(DockPanel dockPanel) : base(new List()) { Items.Add(new DockWindow(dockPanel, DockState.Document)); Items.Add(new DockWindow(dockPanel, DockState.DockLeft)); Items.Add(new DockWindow(dockPanel, DockState.DockRight)); Items.Add(new DockWindow(dockPanel, DockState.DockTop)); Items.Add(new DockWindow(dockPanel, DockState.DockBottom)); } public DockWindow this[DockState dockState] { get { if (dockState == DockState.Document) return Items[0]; else if (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide) return Items[1]; else if (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide) return Items[2]; else if (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide) return Items[3]; else if (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide) return Items[4]; throw (new ArgumentOutOfRangeException()); } } } }