Last change
on this file since 17829 was
17829,
checked in by dpiringe, 3 years ago
|
#3026
- moved JsonItems from Models to JsonItems
- moved WinForms controls from Shared to Views
|
File size:
1.2 KB
|
Rev | Line | |
---|
[17828] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.ComponentModel;
|
---|
| 4 | using System.Data;
|
---|
| 5 | using System.Drawing;
|
---|
| 6 | using System.Linq;
|
---|
| 7 | using System.Text;
|
---|
| 8 | using System.Threading.Tasks;
|
---|
| 9 | using System.Windows.Forms;
|
---|
| 10 |
|
---|
| 11 | namespace HeuristicLab.JsonInterface.OptimizerIntegration {
|
---|
| 12 | public partial class CompoundControl : UserControl {
|
---|
| 13 | private UserControl _topControl;
|
---|
| 14 | public UserControl TopControl {
|
---|
| 15 | get => _topControl;
|
---|
| 16 | set {
|
---|
| 17 | value.Margin = new Padding() { All = 0 };
|
---|
| 18 | tableLayoutPanel1.Controls.Add(value, 0, 0);
|
---|
| 19 | value.Dock = DockStyle.Fill;
|
---|
| 20 | _topControl = value;
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | private UserControl _bottomControl;
|
---|
| 25 | public UserControl BottomControl {
|
---|
| 26 | get => _bottomControl;
|
---|
| 27 | set {
|
---|
| 28 | value.Margin = new Padding() { All = 0 };
|
---|
| 29 | tableLayoutPanel1.Controls.Add(value, 0, 0);
|
---|
| 30 | value.Dock = DockStyle.Fill;
|
---|
| 31 | _bottomControl = value;
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
| 34 | public CompoundControl() {
|
---|
| 35 | InitializeComponent();
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | public static CompoundControl Create(UserControl top, UserControl bottom)
|
---|
| 39 | => new CompoundControl() { TopControl = top, BottomControl = bottom };
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.