source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ArrayValueVM.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: 870 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 abstract class ArrayValueVM<T, JsonItemType> : RangedValueBaseVM<T, JsonItemType>, IArrayJsonItemVM
12    where T : IComparable
13    where JsonItemType : class, IArrayJsonItem, IIntervalRestrictedJsonItem<T> {
14
15    public override UserControl Control => CompoundControl.Create(base.Control, ArrayJsonItemControl.Create(this));
16
17    public ArrayValueVM() { }
18   
19    public abstract T[] Value { get; set; }
20    public bool Resizable {
21      get => Item.Resizable;
22      set {
23        Item.Resizable = value;
24        OnPropertyChange(this, nameof(IArrayJsonItemVM.Resizable));
25      }
26    }
27  }
28}
Note: See TracBrowser for help on using the repository browser.