Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/SingleValueVM.cs @ 17530

Last change on this file since 17530 was 17519, checked in by dpiringe, 5 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: 939 bytes
RevLine 
[17410]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 {
[17411]10
[17473]11  public class BoolValueVM : JsonItemVMBase<BoolJsonItem> {
[17411]12
[17473]13    public bool Value {
14      get => Item.Value;
15      set {
16        Item.Value = value;
17        OnPropertyChange(this, nameof(Value));
18      }
19    }
20   
[17471]21    public override UserControl Control =>
22       new JsonItemBoolControl(this);
[17410]23  }
24
[17473]25  public abstract class SingleValueVM<T, JsonItemType> : RangedValueBaseVM<T, JsonItemType>
26    where T : IComparable
27    where JsonItemType : class, IIntervalRestrictedJsonItem<T>, IValueJsonItem<T>
28  {
29
[17410]30    public T Value {
[17473]31      get => Item.Value;
[17410]32      set {
[17412]33        Item.Value = value;
[17410]34        OnPropertyChange(this, nameof(Value));
35      }
36    }
37  }
38}
Note: See TracBrowser for help on using the repository browser.