Changeset 5850 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views
- Timestamp:
- 03/28/11 19:12:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
r5837 r5850 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using System.Windows.Forms; … … 252 253 if (error != null) throw error; 253 254 IAlgorithm algorithm = content as IAlgorithm; 254 if (algorithm == null || !(algorithm.Problem is IDataAnalysisProblem <IDataAnalysisProblemData>))255 if (algorithm == null || !(algorithm.Problem is IDataAnalysisProblem)) 255 256 MessageBox.Show(this, "The selected file does not contain an algorithm or the problem of the algorithm is not a DataAnalysisProblem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error); 256 257 else … … 274 275 problemTypeSelectorDialog.Caption = "Select Problem"; 275 276 problemTypeSelectorDialog.TypeSelector.Caption = "Available Problems"; 276 problemTypeSelectorDialog.TypeSelector.Configure(Content.ProblemType, false, true);277 }277 } 278 problemTypeSelectorDialog.TypeSelector.Configure(new List<Type>() { Content.ProblemType, Content.Algorithm.ProblemType }, false, true); 278 279 if (problemTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 279 try { 280 Content.Problem = (IDataAnalysisProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 281 } 282 catch (Exception ex) { 283 ErrorHandling.ShowErrorDialog(this, ex); 284 } 280 Content.Problem = (IDataAnalysisProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 285 281 } 286 282 }
Note: See TracChangeset
for help on using the changeset viewer.