Changeset 4068 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindowCollection.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindowCollection.cs
r2645 r4068 1 using System;2 1 using System.Collections.Generic; 3 2 using System.Collections.ObjectModel; 4 using System.Drawing;5 using System.Windows.Forms;6 3 7 namespace WeifenLuo.WinFormsUI.Docking 8 { 9 public class FloatWindowCollection : ReadOnlyCollection<FloatWindow> 10 { 11 internal FloatWindowCollection() 12 : base(new List<FloatWindow>()) 13 { 14 } 4 namespace WeifenLuo.WinFormsUI.Docking { 5 public class FloatWindowCollection : ReadOnlyCollection<FloatWindow> { 6 internal FloatWindowCollection() 7 : base(new List<FloatWindow>()) { 8 } 15 9 16 internal int Add(FloatWindow fw) 17 { 18 if (Items.Contains(fw)) 19 return Items.IndexOf(fw); 10 internal int Add(FloatWindow fw) { 11 if (Items.Contains(fw)) 12 return Items.IndexOf(fw); 20 13 21 22 23 14 Items.Add(fw); 15 return Count - 1; 16 } 24 17 25 internal void Dispose() 26 { 27 for (int i=Count - 1; i>=0; i--) 28 this[i].Close(); 29 } 18 internal void Dispose() { 19 for (int i = Count - 1; i >= 0; i--) 20 this[i].Close(); 21 } 30 22 31 internal void Remove(FloatWindow fw) 32 { 33 Items.Remove(fw); 34 } 23 internal void Remove(FloatWindow fw) { 24 Items.Remove(fw); 25 } 35 26 36 internal void BringWindowToFront(FloatWindow fw) 37 { 38 Items.Remove(fw); 39 Items.Add(fw); 40 } 41 } 27 internal void BringWindowToFront(FloatWindow fw) { 28 Items.Remove(fw); 29 Items.Add(fw); 30 } 31 } 42 32 }
Note: See TracChangeset
for help on using the changeset viewer.