Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PersistenceSpeedUp/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindowCollection.cs @ 18242

Last change on this file since 18242 was 4068, checked in by swagner, 14 years ago

Sorted usings and removed unused usings in entire solution (#1094)

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