Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 17519 was 17519, checked in by dpiringe, 4 years ago

#3026:

  • added error output for failed runner initialization
  • reorganised some final view models
  • TargetedJsonItemType (in JsonItemVMBase) now automatically returns the type of the defined JsonItem
  • code cleanup
  • refactored RegressionProblemDataConverter
  • added lots of comments
  • added new view for StringArrayJsonItem
  • added new UI component for concrete restricted items and used it in JsonItemConcreteItemArrayControl and JsonItemValidValuesControl
File size: 1.3 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    public abstract T[][] Value { get; set; }
16    public bool RowsResizable {
17      get => Item.RowsResizable;
18      set {
19        Item.RowsResizable = value;
20        OnPropertyChange(this, nameof(RowsResizable));
21      }
22    }
23
24    public bool ColumnsResizable {
25      get => Item.ColumnsResizable;
26      set {
27        Item.ColumnsResizable = value;
28        OnPropertyChange(this, nameof(ColumnsResizable));
29      }
30    }
31
32    public IEnumerable<string> RowNames {
33      get => Item.RowNames;
34      set {
35        Item.RowNames = value;
36        OnPropertyChange(this, nameof(RowNames));
37      }
38    }
39    public IEnumerable<string> ColumnNames {
40      get => Item.ColumnNames;
41      set {
42        Item.ColumnNames = value;
43        OnPropertyChange(this, nameof(ColumnNames));
44      }
45    }
46  }
47}
Note: See TracBrowser for help on using the repository browser.