Changeset 16918
- Timestamp:
- 05/08/19 10:22:58 (6 years ago)
- Location:
- branches/2971_named_intervals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/ParsedConstraintView.cs
r16896 r16918 51 51 intervalConstraints.CheckedItemsChanged += constraint_CheckedItemChanged; 52 52 intervalConstraints.ItemsAdded += constraints_Updated; 53 intervalConstraints.ItemsRemoved += constraint s_Updated;53 intervalConstraints.ItemsRemoved += constraint_removed; 54 54 } 55 55 … … 57 57 intervalConstraints.CheckedItemsChanged -= constraint_CheckedItemChanged; 58 58 intervalConstraints.ItemsAdded -= constraints_Updated; 59 intervalConstraints.ItemsRemoved -= constraint s_Updated;59 intervalConstraints.ItemsRemoved -= constraint_removed; 60 60 base.DeregisterContentEvents(); 61 61 } … … 109 109 } 110 110 111 private void constraint_removed(object sender, CollectionItemsChangedEventArgs<IndexedItem<IntervalConstraint>> e) { 112 foreach (var removedItem in e.Items) { 113 removedItem.Value.Changed -= constraint_Changed; 114 } 115 } 116 111 117 private void constraint_CheckedItemChanged(object sender, 112 118 CollectionItemsChangedEventArgs<IndexedItem<IntervalConstraint>> e) { -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs
r16904 r16918 19 19 */ 20 20 #endregion 21 22 using System; 21 23 using System.Collections.Generic; 22 24 using HeuristicLab.Common; … … 32 34 get => HeuristicLab.Common.Resources.VSImageLibrary.Object; 33 35 } 34 public ObservableDictionary<string, Interval> VariableIntervals { get; } = new ObservableDictionary<string, Interval>();36 public IDictionary<string, Interval> VariableIntervals { get; } = new Dictionary<string, Interval>(); 35 37 36 38 [Storable(Name = "StorableIntervalInformation")] … … 61 63 } 62 64 65 public IntervalCollection(IDictionary<string, Interval> variableIntervals) { 66 this.VariableIntervals = variableIntervals; 67 } 68 69 public KeyValuePair<string, Interval> getInterval(string variable) { 70 if (VariableIntervals.ContainsKey(variable)) { 71 return new KeyValuePair<string, Interval>(variable, VariableIntervals[variable]); 72 } else { 73 throw new ArgumentException($"The given variable:{variable} is not present!"); 74 } 75 } 76 77 public IDictionary<string, Interval> getIntervals() { 78 return VariableIntervals; 79 } 80 63 81 public override IDeepCloneable Clone(Cloner cloner) { 64 82 return new IntervalCollection(this, cloner);
Note: See TracChangeset
for help on using the changeset viewer.