Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 17828 was 17828, checked in by dpiringe, 3 years 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
RevLine 
[17410]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 {
[17411]10
[17473]11  public class BoolValueVM : JsonItemVMBase<BoolJsonItem> {
[17411]12
[17473]13    public bool Value {
14      get => Item.Value;
15      set {
16        Item.Value = value;
17        OnPropertyChange(this, nameof(Value));
18      }
19    }
20   
[17828]21    public override UserControl Control => null;
[17410]22  }
23
[17473]24  public abstract class SingleValueVM<T, JsonItemType> : RangedValueBaseVM<T, JsonItemType>
25    where T : IComparable
26    where JsonItemType : class, IIntervalRestrictedJsonItem<T>, IValueJsonItem<T>
27  {
28
[17410]29    public T Value {
[17473]30      get => Item.Value;
[17410]31      set {
[17412]32        Item.Value = value;
[17410]33        OnPropertyChange(this, nameof(Value));
34      }
35    }
36  }
37}
Note: See TracBrowser for help on using the repository browser.