Ignore:
Timestamp:
02/23/21 16:36:44 (8 weeks ago)
Author:
dpiringe
Message:

#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:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/NumericRangeControl.cs

    r17829 r17843  
    1616    public CheckBox EnableMinRange { get; set; }
    1717    public CheckBox EnableMaxRange { get; set; }
    18     public NumericRangeControl() {
     18
     19    private NumericRangeControl() {
    1920      InitializeComponent();
     21      Init();
     22    }
     23
     24    protected NumericRangeControl(IJsonItemVM vm) {
     25      InitializeComponent();
     26      Init();
     27      TBMinRange.DataBindings.Add("Text", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.MinRange));
     28      TBMaxRange.DataBindings.Add("Text", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.MaxRange));
     29      EnableMinRange.DataBindings.Add("Checked", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.EnableMinRange),
     30        false, DataSourceUpdateMode.OnPropertyChanged);
     31      EnableMaxRange.DataBindings.Add("Checked", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.EnableMaxRange),
     32        false, DataSourceUpdateMode.OnPropertyChanged);
     33    }
     34
     35
     36    private void Init() {
    2037      TBMinRange = textBoxFrom;
    2138      TBMaxRange = textBoxTo;
     
    5269    }
    5370
    54     public static UserControl Create(IJsonItemVM vm) {
    55       NumericRangeControl numericRangeControl = new NumericRangeControl();
    56       numericRangeControl.TBMinRange.DataBindings.Add("Text", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.MinRange));
    57       numericRangeControl.TBMaxRange.DataBindings.Add("Text", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.MaxRange));
    58       numericRangeControl.EnableMinRange.DataBindings.Add("Checked", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.EnableMinRange),
    59         false, DataSourceUpdateMode.OnPropertyChanged);
    60       numericRangeControl.EnableMaxRange.DataBindings.Add("Checked", vm, nameof(RangedValueBaseVM<int, IntJsonItem>.EnableMaxRange),
    61         false, DataSourceUpdateMode.OnPropertyChanged);
    62       return numericRangeControl;
    63     }
     71    public static UserControl Create(IJsonItemVM vm) => new NumericRangeControl(vm);
    6472  }
    6573}
Note: See TracChangeset for help on using the changeset viewer.