- Timestamp:
- 11/21/11 16:23:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs
r6968 r7025 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using System.Windows.Forms; … … 58 59 private void loadButton_Click(object sender, EventArgs e) { 59 60 if (benchmarkComboBox.SelectedItem != null) 60 Content. CreateProblemDataFromBenchmark((IDataAnalysisBenchmarkProblemDataGenerator)benchmarkComboBox.SelectedItem);61 Content.ProblemData = ((IDataAnalysisBenchmarkProblemDataGenerator)benchmarkComboBox.SelectedItem).GenerateProblemData(); 61 62 } 62 63 … … 64 65 base.OnContentChanged(); 65 66 benchmarkComboBox.Items.Clear(); 66 benchmarkComboBox.Items.AddRange( Content.GetBenchmarkProblemDataGenerators().OrderBy(b => b.ItemName).ToArray());67 benchmarkComboBox.Items.AddRange(GetBenchmarkProblemDataGenerators().OrderBy(b => b.ItemName).ToArray()); 67 68 if (benchmarkComboBox.Items.Count > 0) 68 69 benchmarkComboBox.SelectedIndex = 0; 69 70 } 71 72 protected IEnumerable<IDataAnalysisBenchmarkProblemDataGenerator> GetBenchmarkProblemDataGenerators() { 73 if (Content is IRegressionProblem) 74 return ApplicationManager.Manager.GetInstances<IRegressionBenchmarkProblemDataGenerator>(); 75 else if (Content is IClassificationProblem) 76 return ApplicationManager.Manager.GetInstances<IClassificationBenchmarkProblemDataGenerator>(); 77 else if (Content is ITimeSeriesPrognosisProblem) 78 return ApplicationManager.Manager.GetInstances<ITimeSeriesBenchmarkProblemDataGenerator>(); 79 else if (Content is IClusteringProblem) 80 return ApplicationManager.Manager.GetInstances<IClusteringBenchmarkProblemDataGenerator>(); 81 return new List<IDataAnalysisBenchmarkProblemDataGenerator>(); 82 } 70 83 } 71 84 }
Note: See TracChangeset
for help on using the changeset viewer.