Line | |
---|
1 | using System.Windows.Forms;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.JsonInterface.OptimizerIntegration {
|
---|
4 | public partial class CompoundControl : UserControl {
|
---|
5 | private UserControl _topControl;
|
---|
6 | public UserControl TopControl {
|
---|
7 | get => _topControl;
|
---|
8 | set {
|
---|
9 | value.Margin = new Padding() { All = 0 };
|
---|
10 | tableLayoutPanel1.Controls.Add(value, 0, 0);
|
---|
11 | value.Dock = DockStyle.Fill;
|
---|
12 | _topControl = value;
|
---|
13 | }
|
---|
14 | }
|
---|
15 |
|
---|
16 | private UserControl _bottomControl;
|
---|
17 | public UserControl BottomControl {
|
---|
18 | get => _bottomControl;
|
---|
19 | set {
|
---|
20 | value.Margin = new Padding() { All = 0 };
|
---|
21 | tableLayoutPanel1.Controls.Add(value, 0, 0);
|
---|
22 | value.Dock = DockStyle.Fill;
|
---|
23 | _bottomControl = value;
|
---|
24 | }
|
---|
25 | }
|
---|
26 |
|
---|
27 | protected CompoundControl() {
|
---|
28 | InitializeComponent();
|
---|
29 | }
|
---|
30 |
|
---|
31 | public static CompoundControl Create(UserControl top, UserControl bottom)
|
---|
32 | => new CompoundControl() { TopControl = top, BottomControl = bottom };
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.