Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/20 17:17:37 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • refactored inheritance structure of json items, now the default JsonItem is an abstract class without properties Value and Range -> splitted up into new interfaces
  • updated view models for new json item structure
  • updated SingleLineArrayJsonWriter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs

    r17471 r17473  
    99
    1010namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    11   public abstract class JsonItemVMBase : IJsonItemVM {
    12     private IJsonItem item;
    13     public IJsonItem Item {
     11  public abstract class JsonItemVMBase<JsonItemType> : IJsonItemVM<JsonItemType>
     12    where JsonItemType : class, IJsonItem
     13  {
     14    IJsonItem IJsonItemVM.Item {
     15      get => item;
     16      set => item = (JsonItemType)value;
     17    }
     18
     19    private JsonItemType item;
     20    public JsonItemType Item {
    1421      get => item;
    1522      set {
     
    2734        Item.Active = value;
    2835        if(TreeNode != null) {
    29           TreeNode.ForeColor = (Selected ? Color.Black : Color.Red);
     36          TreeNode.ForeColor = (Selected ? Color.Green : Color.Black);
    3037          TreeNode.Checked = value;
    3138        }
     
    5057    }
    5158
    52     public abstract Type JsonItemType { get; }
     59    public abstract Type TargetedJsonItemType { get; }
    5360    public abstract UserControl Control { get; }
    5461
Note: See TracChangeset for help on using the changeset viewer.