Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/DoubleVMs.cs @ 17530

Last change on this file since 17530 was 17519, checked in by dpiringe, 5 years ago

#3026:

  • added error output for failed runner initialization
  • reorganised some final view models
  • TargetedJsonItemType (in JsonItemVMBase) now automatically returns the type of the defined JsonItem
  • code cleanup
  • refactored RegressionProblemDataConverter
  • added lots of comments
  • added new view for StringArrayJsonItem
  • added new UI component for concrete restricted items and used it in JsonItemConcreteItemArrayControl and JsonItemValidValuesControl
File size: 1.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using System.Windows.Forms;
7
8namespace HeuristicLab.JsonInterface.OptimizerIntegration {
9  public class DoubleRangeVM : RangeVM<double, DoubleRangeJsonItem> {
10
11    protected override double MinTypeValue => double.MinValue;
12
13    protected override double MaxTypeValue => double.MaxValue;
14
15    public override UserControl Control =>
16      new JsonItemRangeControl(this);
17  }
18
19  public class DoubleArrayValueVM : ArrayValueVM<double, DoubleArrayJsonItem> {
20
21    protected override double MinTypeValue => double.MinValue;
22
23    protected override double MaxTypeValue => double.MaxValue;
24
25    public override UserControl Control =>
26      new JsonItemDoubleArrayValueControl(this);
27
28    public override double[] Value {
29      get => Item.Value;
30      set {
31        Item.Value = value;
32        OnPropertyChange(this, nameof(Value));
33      }
34    }
35  }
36
37  public class DoubleMatrixValueVM : MatrixValueVM<double, DoubleMatrixJsonItem> {
38    public override UserControl Control =>
39      new JsonItemDoubleMatrixValueControl(this);
40
41    public override double[][] Value {
42      get => Item.Value;
43      set {
44        Item.Value = value;
45        OnPropertyChange(this, nameof(Value));
46      }
47    }
48
49    protected override double MinTypeValue => double.MinValue;
50
51    protected override double MaxTypeValue => double.MaxValue;
52  }
53
54  public class DoubleValueVM : SingleValueVM<double, DoubleJsonItem> {
55
56    protected override double MinTypeValue => double.MinValue;
57    protected override double MaxTypeValue => double.MaxValue;
58
59    public override UserControl Control =>
60       new JsonItemDoubleValueControl(this);
61  }
62}
Note: See TracBrowser for help on using the repository browser.