Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/WinFormsUI/Docking/FloatWindowCollection.cs @ 2559

Last change on this file since 2559 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: 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.