Changeset 17843 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ConcreteRestrictedJsonItemVM.cs
- Timestamp:
- 02/23/21 16:36:44 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ConcreteRestrictedJsonItemVM.cs
r17828 r17843 1 using System; 2 using System.Collections.Generic; 1 using System.Collections.Generic; 3 2 using System.Linq; 4 using System.Text;5 using System.Threading.Tasks;6 3 using System.Windows.Forms; 7 4 … … 17 14 public override UserControl Control { 18 15 get { 19 var control = new ConcreteItemsRestrictor(); 20 control.Init(Item.ConcreteRestrictedItems); 16 var control = ConcreteItemsRestrictor.Create(Item.ConcreteRestrictedItems); 21 17 control.OnChecked += AddComboOption; 22 18 control.OnUnchecked += RemoveComboOption; 23 19 return control; 24 }25 }26 27 public V Value {28 get => Item.Value;29 set {30 Item.Value = value;31 OnPropertyChange(this, nameof(Value));32 20 } 33 21 } … … 40 28 41 29 if (!RangeContainsValue()) { 42 Value = GetDefaultValue();30 Item.Value = GetDefaultValue(); 43 31 44 32 //if no elements exists -> deselect item 45 33 if (Range.Count() == 0) 46 34 base.Selected = false; 47 48 OnPropertyChange(this, nameof(Value));49 35 } 50 36
Note: See TracChangeset
for help on using the changeset viewer.