Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/CompoundControl.cs @ 18043

Last change on this file since 18043 was 18043, checked in by dpiringe, 3 years ago

#3026

  • code cleanup
File size: 1016 bytes
Line 
1using System.Windows.Forms;
2
3namespace 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.