Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.7.0/WinFormsUI-2.7.0/Docking/FloatWindowCollection.cs @ 8616

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

#1939: Added DockPanelSuite 2.7.0 to ExtLibs.

File size: 795 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Collections.ObjectModel;
4using System.Drawing;
5using System.Windows.Forms;
6
7namespace WeifenLuo.WinFormsUI.Docking
8{
9  public class FloatWindowCollection : ReadOnlyCollection<FloatWindow>
10  {
11    internal FloatWindowCollection()
12            : base(new List<FloatWindow>())
13    {
14    }
15
16    internal int Add(FloatWindow fw)
17    {
18      if (Items.Contains(fw))
19        return Items.IndexOf(fw);
20
21      Items.Add(fw);
22            return Count - 1;
23    }
24
25    internal void Dispose()
26    {
27      for (int i=Count - 1; i>=0; i--)
28        this[i].Close();
29    }
30
31    internal void Remove(FloatWindow fw)
32    {
33      Items.Remove(fw);
34    }
35
36    internal void BringWindowToFront(FloatWindow fw)
37    {
38      Items.Remove(fw);
39      Items.Add(fw);
40    }
41  }
42}
Note: See TracBrowser for help on using the repository browser.