Changeset 8693 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs
- Timestamp:
- 09/25/12 10:57:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs
r8599 r8693 47 47 var provider = SelectedProvider as DataAnalysisInstanceProvider<T>; 48 48 if (provider != null) { 49 openFileDialog.FileName = GetProblemType() + " instance";50 if ( openFileDialog.ShowDialog() == DialogResult.OK) {49 DataAnalysisImportTypeDialog importTypeDialog = new DataAnalysisImportTypeDialog(); 50 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 51 51 T instance = default(T); 52 52 try { 53 DataAnalysisImportTypeDialog importTypeDialog = new DataAnalysisImportTypeDialog(); 54 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 55 instance = provider.ImportData(openFileDialog.FileName, importTypeDialog.ImportType); 56 } else { 57 return; 58 } 53 instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType); 54 59 55 } 60 56 catch (Exception ex) { … … 66 62 } 67 63 catch (Exception ex) { 68 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName( openFileDialog.FileName), Environment.NewLine + ex.Message), "Cannot load instance");64 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importTypeDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance"); 69 65 } 66 } else { 67 return; 70 68 } 71 69 } else {
Note: See TracChangeset
for help on using the changeset viewer.