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