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/Models
Files:
2 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs

    r17451 r17471  
    2323    }
    2424  }
    25 
    26   public class DoubleNamedMatrixJsonItem : NamedMatrixJsonItemBase<double> {
    27     protected override bool IsInRange() {
    28       for (int c = 0; c < Value.Length; ++c) {
    29         for (int r = 0; r < Value[c].Length; ++r) {
    30           if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
    31             return false;
    32         }
    33       }
    34       return true;
    35     }
    36   }
    3725}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs

    r17454 r17471  
    77namespace HeuristicLab.JsonInterface {
    88  public class IntJsonItem : JsonItem<int> {
     9    //public new IEnumerable<int> Range { get; }
    910    /*
    1011    public int MinValue { get; set; }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs

    r17451 r17471  
    6666    public virtual IEnumerable<object> Range { get; set; }
    6767   
    68     // TODO eigene items für LookUp?
    69     public virtual string ActualName { get; set; }
    70 
    7168    // TODO jsonIgnore dataType?
    7269
     
    110107      Value = jObject[nameof(IJsonItem.Value)]?.ToObject<object>();
    111108      Range = jObject[nameof(IJsonItem.Range)]?.ToObject<object[]>();
    112       ActualName = jObject[nameof(IJsonItem.ActualName)]?.ToString();
    113109    }
    114110    #endregion
     
    118114     * TODO protected abstract bool Validate();
    119115     */
    120 
     116     
    121117    protected virtual bool IsInRange() {
    122118      bool b1 = true, b2 = true;
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/MatrixJsonItemBase.cs

    r17446 r17471  
    1111    public virtual bool ColumnsResizable { get; set; }
    1212
     13    IList<string> rows = new List<string>();
     14    public IEnumerable<string> RowNames {
     15      get => rows;
     16      set => rows = new List<string>(value);
     17    }
     18
     19    IList<string> cols = new List<string>();
     20    public IEnumerable<string> ColumnNames {
     21      get => cols;
     22      set => cols = new List<string>(value);
     23    }
     24
    1325    public override void SetFromJObject(JObject jObject) {
    1426      base.SetFromJObject(jObject);
    1527      RowsResizable = (jObject[nameof(IMatrixJsonItem.RowsResizable)]?.ToObject<bool>()).GetValueOrDefault();
    1628      ColumnsResizable = (jObject[nameof(IMatrixJsonItem.ColumnsResizable)]?.ToObject<bool>()).GetValueOrDefault();
     29      RowNames = jObject[nameof(IMatrixJsonItem.RowNames)]?.ToObject<IEnumerable<string>>();
     30      ColumnNames = jObject[nameof(IMatrixJsonItem.ColumnNames)]?.ToObject<IEnumerable<string>>();
    1731    }
    1832  }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ResultJsonItem.cs

    r17451 r17471  
    66
    77namespace HeuristicLab.JsonInterface {
    8   public class ResultJsonItem : JsonItem {
     8  public class ResultJsonItem : JsonItem, IResultJsonItem {
    99
    1010  }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/UnsupportedJsonItem.cs

    r17433 r17471  
    4343      set => throw new NotSupportedException();
    4444    }
    45 
    46     public override string ActualName {
    47       get => throw new NotSupportedException();
    48       set => throw new NotSupportedException();
    49     }
    5045  }
    5146}
Note: See TracChangeset for help on using the changeset viewer.