source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/SingleValueVM.cs @ 17828

Last change on this file since 17828 was 17828, checked in by dpiringe, 2 months ago

#3026

  • removed the option to set the value for JsonItems via exporter
    • reworked some base controls
    • added new controls for JsonItem specific properties (e.g. ArrayResizable)
    • deleted a lot of obsolet controls
  • removed the Enable checkbox in the detail view of JsonItems
  • exporter now clones the IOptimizer object
  • added a check + message for unsupported exports
  • list of JsonItems now includes unsupported JsonItems (disabled and marked with 'unsupported')
  • refactored the converter type check
    • now every converter has to specify its supported type(s)
File size: 906 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7using System.Windows.Forms;
8
9namespace HeuristicLab.JsonInterface.OptimizerIntegration {
10
11  public class BoolValueVM : JsonItemVMBase<BoolJsonItem> {
12
13    public bool Value {
14      get => Item.Value;
15      set {
16        Item.Value = value;
17        OnPropertyChange(this, nameof(Value));
18      }
19    }
20   
21    public override UserControl Control => null;
22  }
23
24  public abstract class SingleValueVM<T, JsonItemType> : RangedValueBaseVM<T, JsonItemType>
25    where T : IComparable
26    where JsonItemType : class, IIntervalRestrictedJsonItem<T>, IValueJsonItem<T>
27  {
28
29    public T Value {
30      get => Item.Value;
31      set {
32        Item.Value = value;
33        OnPropertyChange(this, nameof(Value));
34      }
35    }
36  }
37}
Note: See TracBrowser for help on using the repository browser.