Last change
on this file since 17405 was
17405,
checked in by dpiringe, 4 years ago
|
#3026:
- added a new way to setup the targeted result types
- added new ui controls: NumericRangeControl, JsonItemArrayControl, JsonItemDefaultControl
- redesigned export dialog -> now the user can navigate with a tree view
- enhanced JsonItemVM
|
File size:
1.2 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Drawing;
|
---|
5 | using System.Data;
|
---|
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 JsonItemBaseControl : UserControl {
|
---|
13 | public JsonItemVM VM { get; set; }
|
---|
14 |
|
---|
15 | private JsonItemBaseControl() {
|
---|
16 | InitializeComponent();
|
---|
17 | }
|
---|
18 |
|
---|
19 | public JsonItemBaseControl(JsonItemVM vm) {
|
---|
20 | InitializeComponent();
|
---|
21 | VM = vm;
|
---|
22 | checkBoxActive.Checked = VM.Selected;
|
---|
23 | textBoxName.Text = VM.Item.Name;
|
---|
24 | if (string.IsNullOrWhiteSpace(VM.Item.ActualName))
|
---|
25 | textBoxActualName.ReadOnly = true;
|
---|
26 | else
|
---|
27 | textBoxActualName.Text = VM.Item.ActualName;
|
---|
28 | }
|
---|
29 |
|
---|
30 | private void checkBoxActive_CheckedChanged(object sender, EventArgs e) {
|
---|
31 | VM.Selected = checkBoxActive.Checked;
|
---|
32 | }
|
---|
33 |
|
---|
34 | private void textBoxName_TextChanged(object sender, EventArgs e) {
|
---|
35 | VM.Item.Name = textBoxName.Text;
|
---|
36 | }
|
---|
37 |
|
---|
38 | private void textBoxActualName_TextChanged(object sender, EventArgs e) {
|
---|
39 | VM.Item.ActualName = textBoxActualName.Text;
|
---|
40 | }
|
---|
41 | }
|
---|
42 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.