Last change
on this file since 3757 was
2645,
checked in by mkommend, 15 years ago
|
extracted external libraries and adapted dependent plugins (ticket #837)
|
File size:
897 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.ObjectModel;
|
---|
3 | using System.Collections.Generic;
|
---|
4 | using System.Drawing;
|
---|
5 | using System.Windows.Forms;
|
---|
6 |
|
---|
7 | namespace WeifenLuo.WinFormsUI.Docking
|
---|
8 | {
|
---|
9 | public class DockPaneCollection : ReadOnlyCollection<DockPane>
|
---|
10 | {
|
---|
11 | internal DockPaneCollection()
|
---|
12 | : base(new List<DockPane>())
|
---|
13 | {
|
---|
14 | }
|
---|
15 |
|
---|
16 | internal int Add(DockPane pane)
|
---|
17 | {
|
---|
18 | if (Items.Contains(pane))
|
---|
19 | return Items.IndexOf(pane);
|
---|
20 |
|
---|
21 | Items.Add(pane);
|
---|
22 | return Count - 1;
|
---|
23 | }
|
---|
24 |
|
---|
25 | internal void AddAt(DockPane pane, int index)
|
---|
26 | {
|
---|
27 | if (index < 0 || index > Items.Count - 1)
|
---|
28 | return;
|
---|
29 |
|
---|
30 | if (Contains(pane))
|
---|
31 | return;
|
---|
32 |
|
---|
33 | Items.Insert(index, pane);
|
---|
34 | }
|
---|
35 |
|
---|
36 | internal void Dispose()
|
---|
37 | {
|
---|
38 | for (int i=Count - 1; i>=0; i--)
|
---|
39 | this[i].Close();
|
---|
40 | }
|
---|
41 |
|
---|
42 | internal void Remove(DockPane pane)
|
---|
43 | {
|
---|
44 | Items.Remove(pane);
|
---|
45 | }
|
---|
46 | }
|
---|
47 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.