Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/09/20 10:36:09 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • deleted INamedMatrixJsonItem and all corresponding classes/views, because of bad design
  • added ILookupJsonItem and IValueLookupJsonItem (incl. all corresponding implementations, VMs, Views)
  • added IResultJsonItem
  • changed type of property Control from JsonItemBaseControl to UserControl in IJsonItemVM (because the details control now builds up with linked user controls -> allows better construction of dynamic controls)
  • added all properties of INamedMatrixJsonItem in IMatrixJsonItem
  • refactored a lot of views for better usage (TableLayoutPanel is used a lot now -> for better item positioning)
  • property ActualName is now located in ILookupJsonItem instead of IJsonItem
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/LookupParameterConverter.cs

    r17433 r17471  
    1212   
    1313    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
    14       ((ILookupParameter)item).ActualName = data.ActualName as string;
     14      ((ILookupParameter)item).ActualName = ((ILookupJsonItem)data).ActualName as string;
    1515
    1616    public override IJsonItem Extract(IItem value, IJsonItemConverter root) {
    1717      IParameter parameter = value as IParameter;
    1818
    19       IJsonItem item = new JsonItem() {
     19      IJsonItem item = new LookupJsonItem() {
    2020        Name = parameter.Name,
    2121        Description = parameter.Description,
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/RegressionProblemDataConverter.cs

    r17464 r17471  
    1818    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
    1919      var dictTmp = new Dictionary<string, IList>();
    20       DoubleNamedMatrixJsonItem matrix = data.Children[0] as DoubleNamedMatrixJsonItem;
     20      DoubleMatrixJsonItem matrix = data.Children[0] as DoubleMatrixJsonItem;
    2121      if(matrix != null) {
    2222        int c = 0;
     
    6868          ++c;
    6969        }
    70         item.AddChildren(new DoubleNamedMatrixJsonItem() {
     70        item.AddChildren(new DoubleMatrixJsonItem() {
    7171          Name = "Dataset",
    7272          Value = mat,
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ResultParameterConverter.cs

    r17451 r17471  
    1717      return new ResultJsonItem() {
    1818        Name = res.ActualName,
    19         ActualName = res.ActualName,
    2019        Value = res.ActualName,
    2120        Description = res.Description
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs

    r17451 r17471  
    1313    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
    1414      IValueLookupParameter param = item as IValueLookupParameter;
    15       param.ActualName = CastValue<string>(data.ActualName);
     15      param.ActualName = CastValue<string>(((IValueLookupJsonItem)data).ActualName);
    1616      if (param.Value != null)
    1717        root.Inject(param.Value, data, root);
     
    2121      IValueLookupParameter param = value as IValueLookupParameter;
    2222
    23       IJsonItem item = new JsonItem() {};
     23      IValueLookupJsonItem item = new ValueLookupJsonItem() {};
    2424
    2525      if (param.Value != null) {
    2626        IJsonItem tmp = root.Extract(param.Value, root);
    27         item = tmp;
     27        item.Value = tmp.Value;
     28        item.Range = tmp.Range;
     29        item.Name = tmp.Name;
     30        item.Description = tmp.Description;
     31        item.AddChildren(tmp.Children);
     32        item.Active = tmp.Active;
     33        item.JsonItemReference = tmp;
    2834      } else {
    2935        var min = GetMinValue(param.DataType);
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeMatrixConverter.cs

    r17451 r17471  
    3333    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
    3434      DoubleMatrix mat = item as DoubleMatrix;
    35       DoubleNamedMatrixJsonItem d = data as DoubleNamedMatrixJsonItem;
     35      DoubleMatrixJsonItem d = data as DoubleMatrixJsonItem;
    3636      CopyMatrixData(mat, d.Value);
    3737    }
    3838
    3939    public override IJsonItem Extract(IItem value, IJsonItemConverter root) =>
    40       new DoubleNamedMatrixJsonItem() {
     40      new DoubleMatrixJsonItem() {
    4141        Name = "[OverridableParamName]",
    4242        Description = value.ItemDescription,
Note: See TracChangeset for help on using the changeset viewer.