- Timestamp:
- 02/04/11 01:29:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs
r4569 r5419 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Windows.Forms; 24 25 using HeuristicLab.Common; … … 102 103 } 103 104 105 protected override void OnClosed(FormClosedEventArgs e) { 106 if ((Content != null) && (Content.ExecutionState == ExecutionState.Started)) { 107 //The content must be stopped if no other view showing the content is available 108 var optimizers = MainFormManager.MainForm.Views.OfType<IContentView>().Where(v => v != this).Select(v => v.Content).OfType<IOptimizer>(); 109 //add nested optimizers 110 optimizers = optimizers.SelectMany(opt => opt.NestedOptimizers).Union(optimizers); 111 112 if (!optimizers.Contains(Content)) Content.Stop(); 113 } 114 base.OnClosed(e); 115 } 116 104 117 protected override void SetEnabledStateOfControls() { 105 118 if (InvokeRequired) Invoke((Action)SetEnabledStateOfControls);
Note: See TracChangeset
for help on using the changeset viewer.