Changeset 16928
- Timestamp:
- 05/08/19 15:56:02 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/ProblemDataConstraint.cs
r16896 r16928 23 23 using System; 24 24 using System.Collections.Generic; 25 using System.Linq; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; … … 36 37 "d'y'/d'x' in [0 .. 10]" + Environment.NewLine + 37 38 "\u2202²'y'/\u2202'x'² in ]-1 .. inf.["; 38 39 40 private string input; 39 41 [Storable] 40 public string Input { get; set; } 42 public string Input { 43 get => input; 44 set { 45 if (input == value) return; 46 input = value; 47 OnChanged(); 48 } 49 } 41 50 42 51 private IEnumerable<IntervalConstraint> constraints; … … 44 53 public IEnumerable<IntervalConstraint> Constraints { 45 54 get => constraints; 46 set { 55 set { 56 if (constraints == value) return; 47 57 constraints = value; 48 OnChanged( EventArgs.Empty);58 OnChanged(); 49 59 } 50 60 } … … 58 68 : base(original, cloner) { 59 69 this.Input = original.Input; 60 this.constraints = original.Constraints ;61 this.ProblemData = original.ProblemData;70 this.constraints = original.Constraints.Select(cloner.Clone); 71 this.ProblemData = cloner.Clone(original.ProblemData); 62 72 } 63 73 … … 79 89 80 90 public event EventHandler Changed; 81 protected virtual void OnChanged( EventArgs e) {91 protected virtual void OnChanged() { 82 92 EventHandler handlers = Changed; 83 93 if (handlers != null) 84 handlers(this, e);94 handlers(this, EventArgs.Empty); 85 95 } 86 96 }
Note: See TracChangeset
for help on using the changeset viewer.