source:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ArrayValueVM.cs
@
17712
Last change on this file since 17712 was 17519, checked in by dpiringe, 5 years ago | |
---|---|
File size: 1.3 KB |
Rev | Line | |
---|---|---|
[17417] | 1 | using System; |
2 | using System.Collections.Generic; | |
[17420] | 3 | using System.ComponentModel; |
[17417] | 4 | using System.Linq; |
5 | using System.Text; | |
6 | using System.Threading.Tasks; | |
[17471] | 7 | using System.Windows.Forms; |
[17417] | 8 | |
9 | namespace HeuristicLab.JsonInterface.OptimizerIntegration { | |
[17420] | 10 | |
[17519] | 11 | |
[17420] | 12 | |
13 | ||
14 | ||
[17519] | 15 | /* |
16 | public class StringArrayValueVM : ArrayValueVM<int, IntArrayJsonItem> { | |
17 | public override Type TargetedJsonItemType => typeof(StringArrayJsonItem); | |
[17420] | 18 | |
19 | protected override int MinTypeValue => int.MinValue; | |
20 | ||
21 | protected override int MaxTypeValue => int.MaxValue; | |
22 | ||
[17471] | 23 | public override UserControl Control => |
[17464] | 24 | new JsonItemBaseControl(this, new JsonItemIntArrayValueControl(this)); |
[17519] | 25 | |
[17431] | 26 | public override int[] Value { |
[17484] | 27 | get => Item.Value; |
[17431] | 28 | set { |
[17484] | 29 | Item.Value = value; |
[17431] | 30 | OnPropertyChange(this, nameof(Value)); |
[17420] | 31 | } |
32 | } | |
33 | } | |
[17519] | 34 | */ |
[17420] | 35 | |
[17519] | 36 | |
[17473] | 37 | public abstract class ArrayValueVM<T, JsonItemType> : RangedValueBaseVM<T, JsonItemType>, IArrayJsonItemVM |
38 | where T : IComparable | |
39 | where JsonItemType : class, IArrayJsonItem, IIntervalRestrictedJsonItem<T> { | |
[17431] | 40 | |
[17433] | 41 | public ArrayValueVM() { } |
[17484] | 42 | |
[17431] | 43 | public abstract T[] Value { get; set; } |
[17446] | 44 | public bool Resizable { |
[17484] | 45 | get => Item.Resizable; |
[17446] | 46 | set { |
[17484] | 47 | Item.Resizable = value; |
[17446] | 48 | OnPropertyChange(this, nameof(IArrayJsonItemVM.Resizable)); |
49 | } | |
50 | } | |
[17420] | 51 | } |
[17417] | 52 | } |
Note: See TracBrowser
for help on using the repository browser.