Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.7.0/WinFormsUI-2.7.0/Docking/DockWindowCollection.cs @ 16123

Last change on this file since 16123 was 8616, checked in by mkommend, 12 years ago

#1939: Added DockPanelSuite 2.7.0 to ExtLibs.

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Collections.ObjectModel;
4
5namespace 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.