Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs @ 17454

Last change on this file since 17454 was 17454, checked in by dpiringe, 4 years ago

#3026:

  • fixed a type conversion bug in RangeVM
  • implemented logic for JsonItemRangeControl
File size: 865 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
7namespace HeuristicLab.JsonInterface {
8  public class IntJsonItem : JsonItem<int> {
9    /*
10    public int MinValue { get; set; }
11    public int MaxValue { get; set; }
12    */
13  }
14  public class IntArrayJsonItem : ArrayJsonItemBase<int> { }
15  public class IntRangeJsonItem : ArrayJsonItemBase<int> {
16    public override bool Resizable { get => false; set { } }
17  }
18  public class IntMatrixJsonItem : MatrixJsonItemBase<int> {
19
20    protected override bool IsInRange() {
21      for (int c = 0; c < Value.Length; ++c) {
22        for (int r = 0; r < Value[c].Length; ++r) {
23          if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
24            return false;
25        }
26      }
27      return true;
28    }
29  }
30}
Note: See TracBrowser for help on using the repository browser.