Last change
on this file since 7489 was
2645,
checked in by mkommend, 15 years ago
|
extracted external libraries and adapted dependent plugins (ticket #837)
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Collections.ObjectModel;
|
---|
4 |
|
---|
5 | namespace WeifenLuo.WinFormsUI.Docking
|
---|
6 | {
|
---|
7 | public class DockWindowCollection : ReadOnlyCollection<DockWindow>
|
---|
8 | {
|
---|
9 | internal DockWindowCollection(DockPanel dockPanel)
|
---|
10 | : base(new List<DockWindow>())
|
---|
11 | {
|
---|
12 | Items.Add(new DockWindow(dockPanel, DockState.Document));
|
---|
13 | Items.Add(new DockWindow(dockPanel, DockState.DockLeft));
|
---|
14 | Items.Add(new DockWindow(dockPanel, DockState.DockRight));
|
---|
15 | Items.Add(new DockWindow(dockPanel, DockState.DockTop));
|
---|
16 | Items.Add(new DockWindow(dockPanel, DockState.DockBottom));
|
---|
17 | }
|
---|
18 |
|
---|
19 | public DockWindow this [DockState dockState]
|
---|
20 | {
|
---|
21 | get
|
---|
22 | {
|
---|
23 | if (dockState == DockState.Document)
|
---|
24 | return Items[0];
|
---|
25 | else if (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide)
|
---|
26 | return Items[1];
|
---|
27 | else if (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide)
|
---|
28 | return Items[2];
|
---|
29 | else if (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide)
|
---|
30 | return Items[3];
|
---|
31 | else if (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide)
|
---|
32 | return Items[4];
|
---|
33 |
|
---|
34 | throw (new ArgumentOutOfRangeException());
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|
38 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.