Changeset 17473 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs
- Timestamp:
- 03/10/20 17:17:37 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs
r17471 r17473 9 9 10 10 namespace HeuristicLab.JsonInterface.OptimizerIntegration { 11 public abstract class JsonItemVMBase : IJsonItemVM { 12 private IJsonItem item; 13 public IJsonItem Item { 11 public abstract class JsonItemVMBase<JsonItemType> : IJsonItemVM<JsonItemType> 12 where JsonItemType : class, IJsonItem 13 { 14 IJsonItem IJsonItemVM.Item { 15 get => item; 16 set => item = (JsonItemType)value; 17 } 18 19 private JsonItemType item; 20 public JsonItemType Item { 14 21 get => item; 15 22 set { … … 27 34 Item.Active = value; 28 35 if(TreeNode != null) { 29 TreeNode.ForeColor = (Selected ? Color. Black : Color.Red);36 TreeNode.ForeColor = (Selected ? Color.Green : Color.Black); 30 37 TreeNode.Checked = value; 31 38 } … … 50 57 } 51 58 52 public abstract Type JsonItemType { get; }59 public abstract Type TargetedJsonItemType { get; } 53 60 public abstract UserControl Control { get; } 54 61
Note: See TracChangeset
for help on using the changeset viewer.