Changeset 3894 for trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs
- Timestamp:
- 06/02/10 21:34:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs
r3668 r3894 55 55 Content.QualityChanged -= new EventHandler(Content_QualityChanged); 56 56 Content.PopulationChanged -= new EventHandler(Content_PopulationChanged); 57 Content.BoundsChanged -= new EventHandler(Content_BoundsChanged); 57 58 base.DeregisterContentEvents(); 58 59 } … … 63 64 Content.QualityChanged += new EventHandler(Content_QualityChanged); 64 65 Content.PopulationChanged += new EventHandler(Content_PopulationChanged); 66 Content.BoundsChanged += new EventHandler(Content_BoundsChanged); 65 67 } 66 68 … … 99 101 GenerateImage(); 100 102 } 103 } 104 105 private void Content_BoundsChanged(object sender, EventArgs e) { 106 if (InvokeRequired) 107 Invoke(new EventHandler(Content_BoundsChanged), sender, e); 108 else 109 GenerateImage(); 101 110 } 102 111 … … 139 148 } 140 149 pictureBox.Refresh(); 141 DoubleMatrix bounds = Content.Evaluator.Bounds; 150 DoubleMatrix bounds = Content.Bounds; 151 if (bounds == null) bounds = Content.Evaluator.Bounds; 142 152 double xMin = bounds[0, 0], xMax = bounds[0, 1], yMin = bounds[1 % bounds.Rows, 0], yMax = bounds[1 % bounds.Rows, 1]; 143 153 double xStep = backgroundImage.Width / (xMax - xMin), yStep = backgroundImage.Height / (yMax - yMin); … … 164 174 backgroundImage.Dispose(); 165 175 backgroundImage = new Bitmap(pictureBox.Width, pictureBox.Height); 166 DoubleMatrix bounds = Content.Evaluator.Bounds; 176 DoubleMatrix bounds = Content.Bounds; 177 if (bounds == null) bounds = Content.Evaluator.Bounds; 167 178 double xMin = bounds[0, 0], xMax = bounds[0, 1], yMin = bounds[1 % bounds.Rows, 0], yMax = bounds[1 % bounds.Rows, 1]; 168 179 double xStep = (xMax - xMin) / backgroundImage.Width, yStep = (yMax - yMin) / backgroundImage.Height;
Note: See TracChangeset
for help on using the changeset viewer.