Changeset 15370 for trunk/sources
- Timestamp:
- 09/19/17 08:36:37 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r15185 r15370 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.