Changeset 15381
- Timestamp:
- 09/26/17 14:57:33 (7 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 15370
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.DataPreprocessing.Views merged: 15370
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r15242 r15381 150 150 importProblemDataTypeContextMenuStrip.Show(Cursor.Position); 151 151 } 152 private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) {153 Import(new RegressionCSVInstanceProvider(), new RegressionImportDialog(),154 (dialog => ((RegressionImportDialog)dialog).ImportType));155 } 156 private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) {157 Import(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(),158 (dialog => ((ClassificationImportDialog)dialog).ImportType));159 } 160 private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) {161 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(),162 (dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType));163 } 164 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog,152 private async void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) { 153 await ImportAsync(new RegressionCSVInstanceProvider(), new RegressionImportDialog(), 154 dialog => ((RegressionImportDialog)dialog).ImportType); 155 } 156 private async void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) { 157 await ImportAsync(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(), 158 dialog => ((ClassificationImportDialog)dialog).ImportType); 159 } 160 private async void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) { 161 await ImportAsync(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(), 162 dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType); 163 } 164 private async Task ImportAsync<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog, 165 165 Func<DataAnalysisImportDialog, TImportType> getImportType) 166 166 where TProblemData : class, IDataAnalysisProblemData 167 167 where TImportType : DataAnalysisImportType { 168 168 if (importDialog.ShowDialog() == DialogResult.OK) { 169 Task.Run(() => {169 await Task.Run(() => { 170 170 TProblemData instance; 171 171 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm;
Note: See TracChangeset
for help on using the changeset viewer.