Changeset 3649
- Timestamp:
- 05/05/10 18:35:30 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs
r3566 r3649 50 50 Content.WeightsChanged -= new EventHandler(Content_WeightsChanged); 51 51 Content.ValuesChanged -= new EventHandler(Content_ValuesChanged); 52 Content.QualityChanged -= new EventHandler(Content_QualityChanged); 52 53 base.DeregisterContentEvents(); 53 54 } … … 59 60 Content.WeightsChanged += new EventHandler(Content_WeightsChanged); 60 61 Content.ValuesChanged += new EventHandler(Content_ValuesChanged); 62 Content.QualityChanged += new EventHandler(Content_QualityChanged); 61 63 } 62 64 … … 64 66 if (InvokeRequired) 65 67 Invoke(new EventHandler(Content_BinaryVectorChanged), sender, e); 68 else 69 GenerateImage(); 70 } 71 72 void Content_QualityChanged(object sender, EventArgs e) { 73 if (InvokeRequired) 74 Invoke(new EventHandler(Content_QualityChanged), sender, e); 66 75 else 67 76 GenerateImage(); -
trunk/sources/HeuristicLab.Problems.OneMax.Views/3.3/OneMaxSolutionView.cs
r3645 r3649 48 48 } 49 49 50 protected override void DeregisterContentEvents() { 51 Content.BinaryVectorChanged -= new EventHandler(Content_BinaryVectorChanged); 52 Content.QualityChanged -= new EventHandler(Content_QualityChanged); 53 base.DeregisterContentEvents(); 54 } 55 protected override void RegisterContentEvents() { 56 base.RegisterContentEvents(); 57 Content.BinaryVectorChanged += new EventHandler(Content_BinaryVectorChanged); 58 Content.QualityChanged += new EventHandler(Content_QualityChanged); 59 } 60 61 void Content_QualityChanged(object sender, EventArgs e) { 62 if (InvokeRequired) 63 Invoke(new EventHandler(Content_QualityChanged), sender, e); 64 else { 65 qualityView.ViewType = null; 66 qualityView.Content = Content.Quality; 67 } 68 } 69 70 void Content_BinaryVectorChanged(object sender, EventArgs e) { 71 if (InvokeRequired) 72 Invoke(new EventHandler(Content_QualityChanged), sender, e); 73 else { 74 binaryVectorView.ViewType = null; 75 binaryVectorView.Content = Content.BinaryVector; 76 } 77 } 78 50 79 protected override void OnContentChanged() { 51 80 base.OnContentChanged(); -
trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs
r3647 r3649 48 48 } 49 49 50 protected override void DeregisterContentEvents() { 51 Content.RealVectorChanged -= new EventHandler(Content_RealVectorChanged); 52 Content.QualityChanged -= new EventHandler(Content_QualityChanged); 53 base.DeregisterContentEvents(); 54 } 55 protected override void RegisterContentEvents() { 56 base.RegisterContentEvents(); 57 Content.RealVectorChanged += new EventHandler(Content_RealVectorChanged); 58 Content.QualityChanged += new EventHandler(Content_QualityChanged); 59 } 60 61 void Content_QualityChanged(object sender, EventArgs e) { 62 if (InvokeRequired) 63 Invoke(new EventHandler(Content_QualityChanged), sender, e); 64 else { 65 qualityView.ViewType = null; 66 qualityView.Content = Content.Quality; 67 } 68 } 69 70 void Content_RealVectorChanged(object sender, EventArgs e) { 71 if (InvokeRequired) 72 Invoke(new EventHandler(Content_QualityChanged), sender, e); 73 else { 74 realVectorView.ViewType = null; 75 realVectorView.Content = Content.RealVector; 76 } 77 } 78 50 79 protected override void OnContentChanged() { 51 80 base.OnContentChanged();
Note: See TracChangeset
for help on using the changeset viewer.