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