Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/20 15:13:35 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • added initial VM (ArrayValueVM) and control for array values (JsonItemArrayValueControl)
  • new types of JsonItems for better type safety:
    • for arrays: DoubleArrayJsonItem, IntArrayJsonItem, BoolArrayJsonItem
    • for matrix: DoubleMatrixJsonItem, IntMatrixJsonItem, BoolMatrixJsonItem
  • refactored ValueTypeArrayConverter and ValueTypeMatrixConverter -> better type safety with new JsonItems
  • enhanced StringValueVM and implemented JsonItemValidValuesControl with MVVM architecture
  • the VM of JsonItemBaseControl is now protected (was private)
  • improved JsonItem<V,R> -> now handles JTokens correctly
File:
1 edited

Legend:

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

    r17411 r17417  
    1313
    1414  public class JsonItemIntValueControl : JsonItemValueControl {
    15     private readonly IntValueVM vm;
    1615
    1716    #region Overriden Properties
    18     protected override object VM => vm;
    1917    protected override string ValuePropertyId => nameof(IntValueVM.Value);
    2018    protected override string MinRangePropertyId => nameof(IntValueVM.MinRange);
     
    2523
    2624    public JsonItemIntValueControl(IntValueVM vm) : base(vm) {
    27       this.vm = vm;
    2825      Init();
    2926    }
     
    3229
    3330  public class JsonItemDoubleValueControl : JsonItemValueControl {
    34     private readonly DoubleValueVM vm;
    3531
    3632    #region Overriden Properties
    37     protected override object VM => vm;
    3833    protected override string ValuePropertyId => nameof(DoubleValueVM.Value);
    3934    protected override string MinRangePropertyId => nameof(DoubleValueVM.MinRange);
     
    4439
    4540    public JsonItemDoubleValueControl(DoubleValueVM vm) : base(vm) {
    46       this.vm = vm;
    4741      Init();
    4842    }
     
    5751
    5852    #region Abstract Properties
    59     protected abstract object VM { get; }
    6053    protected abstract string ValuePropertyId { get; }
    6154    protected abstract string MinRangePropertyId { get; }
     
    7265
    7366    protected void Init() {
    74       TBValue.DataBindings.Add("Text", VM, ValuePropertyId);
     67      TBValue.DataBindings.Add("Text", base.VM, ValuePropertyId);
    7568      NumericRangeControl.TBMinRange.DataBindings.Add("Text", VM, MinRangePropertyId);
    7669      NumericRangeControl.TBMaxRange.DataBindings.Add("Text", VM, MaxRangePropertyId);
Note: See TracChangeset for help on using the changeset viewer.