Last change
on this file since 17454 was
17454,
checked in by dpiringe, 5 years ago
|
#3026:
- fixed a type conversion bug in RangeVM
- implemented logic for JsonItemRangeControl
|
File size:
865 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 |
|
---|
7 | namespace 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.