Last change
on this file since 17404 was
17404,
checked in by dpiringe, 4 years ago
|
#3026:
- fixed a bug in BaseConverter -> the range for percent values should be returned correctly now
- fixed a bug in ConstrainedValueParameterConverter, ParameterizedItemConverter, ValueParameterConverter -> unsupported json items get filtered now
- JCGenerator is now a dynamic class and can return all JsonItems for an IOptimizer now (instead of string only) + it is now possible to generate an template string with an IEnumerable<JsonItem>
- added first version of an export dialog for JsonInterface
- it is organized with a main view (for the dialog) and some user controls (for a better visualization of an JsonItem -> to reduce wrong user inputs)
- the user controls inherit a base control, which organizes some base values of an JsonItem
|
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 | labelPath.Text = VM.Item.Path;
|
---|
23 | checkBoxActive.Checked = VM.Selected;
|
---|
24 | textBoxName.Text = VM.Item.Name;
|
---|
25 | if (string.IsNullOrWhiteSpace(VM.Item.ActualName))
|
---|
26 | textBoxActualName.ReadOnly = true;
|
---|
27 | else
|
---|
28 | textBoxActualName.Text = VM.Item.ActualName;
|
---|
29 | }
|
---|
30 |
|
---|
31 | private void checkBoxActive_CheckedChanged(object sender, EventArgs e) {
|
---|
32 | VM.Selected = checkBoxActive.Checked;
|
---|
33 | }
|
---|
34 |
|
---|
35 | private void textBoxName_TextChanged(object sender, EventArgs e) {
|
---|
36 | VM.Item.Name = textBoxName.Text;
|
---|
37 | }
|
---|
38 |
|
---|
39 | private void textBoxActualName_TextChanged(object sender, EventArgs e) {
|
---|
40 | VM.Item.ActualName = textBoxActualName.Text;
|
---|
41 | }
|
---|
42 | }
|
---|
43 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.