Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/MatrixValueVM.cs @ 17828

Last change on this file since 17828 was 17828, checked in by dpiringe, 3 years 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: 1.4 KB
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
12  public abstract class MatrixValueVM<T, JsonItemType> : RangedValueBaseVM<T, JsonItemType>, IMatrixJsonItemVM
13    where T : IComparable
14    where JsonItemType : class, IMatrixJsonItem, IIntervalRestrictedJsonItem<T> {
15
16    public override UserControl Control => CompoundControl.Create(base.Control, MatrixJsonItemControl.Create(this));
17
18    public abstract T[][] Value { get; set; }
19    public bool RowsResizable {
20      get => Item.RowsResizable;
21      set {
22        Item.RowsResizable = value;
23        OnPropertyChange(this, nameof(RowsResizable));
24      }
25    }
26
27    public bool ColumnsResizable {
28      get => Item.ColumnsResizable;
29      set {
30        Item.ColumnsResizable = value;
31        OnPropertyChange(this, nameof(ColumnsResizable));
32      }
33    }
34
35    public IEnumerable<string> RowNames {
36      get => Item.RowNames;
37      set {
38        Item.RowNames = value;
39        OnPropertyChange(this, nameof(RowNames));
40      }
41    }
42    public IEnumerable<string> ColumnNames {
43      get => Item.ColumnNames;
44      set {
45        Item.ColumnNames = value;
46        OnPropertyChange(this, nameof(ColumnNames));
47      }
48    }
49  }
50}
Note: See TracBrowser for help on using the repository browser.