Free cookie consent management tool by TermsFeed Policy Generator

source: branches/Persistence Test/WinFormsUI/Docking/DockWindowCollection.cs @ 2491

Last change on this file since 2491 was 2134, checked in by gkronber, 15 years ago

Added up to date source of Weifen Luo dock panel suit in a separate project (and added strong name key). Removed binary versions of Weifen Luo dock panel suite and references to it. #687 (Update AdvancedOptimizationFrontend to use more recent version of Weifen Luo Docking library)

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.