Last change
on this file since 17410 was
17410,
checked in by dpiringe, 5 years ago
|
#3026:
- deleted JsonItemArrayControl and JsonItemDefaultControl
- redesigned architecture for JsonItem: now there are different types of JsonItem (IntJsonItem, BoolJsonItem, ...) -> for better type safety and expandability
- fixed bug in BaseConverter for GetMinValue and GetMaxValue for IntValue, but ignored for other value types (DoubleValue, DateTimeValue, ...) because the redesign of JsonItem-Architecture can make these two methods obsolet soon
- fixed bug in JsonItemConverter to prevent null pointer exceptions
- refactored value and range converters -> removed complicated generic ValueTypeValueConverter and ValueRangeConverter and implemented the necessary methods directly in concrete classes (improves readability and removes the need of reflection)
- redesigned view handling in OptimizerIntegration -> dynamically seaches for JsonItemVMBase implementations, which are connected with a view
- this enables better scaling with more user controls
- JsonItemVMBase implements MVVM architecture
|
File size:
591 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.OptimizerIntegration {
|
---|
8 | public class StringValueVM : JsonItemVM {
|
---|
9 | public override Type JsonItemType => typeof(StringJsonItem);
|
---|
10 | public override JsonItemBaseControl GetControl() =>
|
---|
11 | new JsonItemValidValuesControl(this);
|
---|
12 |
|
---|
13 | public string Value {
|
---|
14 | get => base.Item.Value.ToString();
|
---|
15 | set {
|
---|
16 | base.Item.Value = value;
|
---|
17 | OnPropertyChange(this, nameof(Value));
|
---|
18 | }
|
---|
19 | }
|
---|
20 | }
|
---|
21 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.