Last change
on this file since 17843 was
17843,
checked in by dpiringe, 3 years ago
|
#3026
- removed property ConvertableType from all converters
- removed the option to fixate or loosen the path of JsonItems (obsolete)
- added a abstract formatter SymbolicRegressionSolutionFormatterBase as base formatter for ISymbolicRegressionSolution
- unified the construction of exporter controls
- code cleanup
|
File size:
928 bytes
|
Line | |
---|
1 | using System.Linq;
|
---|
2 | using System.Windows.Forms;
|
---|
3 |
|
---|
4 | namespace HeuristicLab.JsonInterface.OptimizerIntegration {
|
---|
5 | public partial class ResultJsonItemControl : UserControl {
|
---|
6 | private ResultJsonItemControl() {
|
---|
7 | InitializeComponent();
|
---|
8 | }
|
---|
9 |
|
---|
10 | protected ResultJsonItemControl(ResultItemVM vm) {
|
---|
11 | InitializeComponent();
|
---|
12 | var formatters = ResultFormatter.ForType(vm.Item.ValueType).ToList();
|
---|
13 | comboBoxFormatter.DataSource = formatters;
|
---|
14 | comboBoxFormatter.DisplayMember = "Name";
|
---|
15 |
|
---|
16 | // set action to override the ResultFormatterType property for changing the selected value
|
---|
17 | comboBoxFormatter.SelectedValueChanged += (s, e) => vm.ResultFormatterType = comboBoxFormatter.SelectedValue.GetType().FullName;
|
---|
18 | comboBoxFormatter.SelectedItem = formatters.Last();
|
---|
19 | }
|
---|
20 |
|
---|
21 | public static ResultJsonItemControl Create(ResultItemVM vm) => new ResultJsonItemControl(vm);
|
---|
22 | }
|
---|
23 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.