Changeset 6549
- Timestamp:
- 07/08/11 09:52:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentTreeView.cs
r6542 r6549 106 106 107 107 if (algorithm != null) { 108 algorithm.Prepared += new EventHandler(algorithm_Prepared); 108 109 algorithm.ProblemChanged += new EventHandler(algorithm_ProblemChanged); 109 110 } else if (batchRun != null) { … … 125 126 var batchRun = namedItem as BatchRun; 126 127 var experiment = namedItem as Experiment; 128 127 129 if (algorithm != null) { 130 algorithm.Prepared -= new EventHandler(algorithm_Prepared); 128 131 algorithm.ProblemChanged -= new EventHandler(algorithm_ProblemChanged); 129 132 } else if (batchRun != null) { … … 156 159 } 157 160 SetEnabledStateOfControls(); 161 } 162 163 private void algorithm_Prepared(object sender, EventArgs e) { 164 var algorithm = (IAlgorithm)sender; 165 foreach (TreeNode node in treeNodeTagMapping[algorithm]) { 166 TreeNode resultsNode = node.Nodes.OfType<TreeNode>().Where(x => x.Tag is ResultCollection).Single(); 167 if (detailsViewHost.Content == resultsNode.Tag) 168 detailsViewHost.Content = algorithm.Results; 169 resultsNode.Tag = algorithm.Results; 170 } 158 171 } 159 172
Note: See TracChangeset
for help on using the changeset viewer.