43 lines
999 B
C#
43 lines
999 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Collections.ObjectModel;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.Windows.Forms;
|
|||
|
|
#pragma warning disable CS1591 // ȱ<>ٶԹ<D9B6><D4B9><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>Ա<EFBFBD><D4B1> XML ע<><D7A2>
|
|||
|
|
namespace WeifenLuo.WinFormsUI.Docking
|
|||
|
|
{
|
|||
|
|
public class FloatWindowCollection : ReadOnlyCollection<FloatWindow>
|
|||
|
|
{
|
|||
|
|
internal FloatWindowCollection()
|
|||
|
|
: base(new List<FloatWindow>())
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal int Add(FloatWindow fw)
|
|||
|
|
{
|
|||
|
|
if (Items.Contains(fw))
|
|||
|
|
return Items.IndexOf(fw);
|
|||
|
|
|
|||
|
|
Items.Add(fw);
|
|||
|
|
return Count - 1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal void Dispose()
|
|||
|
|
{
|
|||
|
|
for (int i=Count - 1; i>=0; i--)
|
|||
|
|
this[i].Close();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal void Remove(FloatWindow fw)
|
|||
|
|
{
|
|||
|
|
Items.Remove(fw);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
internal void BringWindowToFront(FloatWindow fw)
|
|||
|
|
{
|
|||
|
|
Items.Remove(fw);
|
|||
|
|
Items.Add(fw);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|