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

Last change on this file since 17829 was 17829, checked in by dpiringe, 2 months ago

#3026

  • moved JsonItems from Models to JsonItems
  • moved WinForms controls from Shared to Views
File size: 1.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Threading.Tasks;
9using System.Windows.Forms;
10
11namespace 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.