Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/17/20 12:33:35 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • refactored JsonTemplateInstantiator -> now returns a InstantiatorResult which contains the optimizer and an IEnumerable of IResultJsonItem
  • code cleanup in JCGenerator
  • relocated the serialization of json items into IJsonItem with method GenerateJObject (virtual base implementation in JsonItem)
    • this allows custom serialization for json items (example: ValueLookupJsonItem)
    • items of interface IIntervalRestrictedJsonItem have a custom implementation of GenerateJObject -> hides Minimum and Maximum if the values are the physically min/max of their type
  • code cleanup in BaseConverter
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels
Files:
2 edited

Legend:

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

    r17473 r17477  
    1313  {
    1414    IJsonItem IJsonItemVM.Item {
    15       get => item;
    16       set => item = (JsonItemType)value;
     15      get => Item;
     16      set => Item = (JsonItemType)value;
    1717    }
    1818
     
    3939        if (TreeView != null)
    4040          TreeView.Refresh();
     41        SelectedChanged?.Invoke();
    4142        OnPropertyChange(this, nameof(Selected));
    4243      }
     
    6263    public event PropertyChangedEventHandler PropertyChanged;
    6364    public event Action ItemChanged;
     65    public event Action SelectedChanged;
    6466
    6567
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ValueLookupJsonItemVM.cs

    r17473 r17477  
    1010    public override Type TargetedJsonItemType => typeof(ValueLookupJsonItem);
    1111    public override UserControl Control => new ValueLookupJsonItemControl(this);
    12     public IJsonItem JsonItemReference => ((IValueLookupJsonItem)Item).JsonItemReference;
     12    public IJsonItem JsonItemReference => ((IValueLookupJsonItem)Item).ActualValue;
     13
     14    public ValueLookupJsonItemVM() {
     15      base.SelectedChanged += () => {
     16        if (JsonItemReference != null)
     17          JsonItemReference.Active = base.Selected;
     18      };
     19    }
    1320  }
    1421}
Note: See TracChangeset for help on using the changeset viewer.