Changeset 15197
- Timestamp:
- 07/11/17 13:02:11 (7 years ago)
- Location:
- stable
- Files:
-
- 8 deleted
- 7 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
stable/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r14186 r15197 140 140 } 141 141 private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) { 142 Import(new RegressionCSVInstanceProvider(), new RegressionImport TypeDialog(),143 (dialog => ((RegressionImport TypeDialog)dialog).ImportType));142 Import(new RegressionCSVInstanceProvider(), new RegressionImportDialog(), 143 (dialog => ((RegressionImportDialog)dialog).ImportType)); 144 144 } 145 145 private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) { 146 Import(new ClassificationCSVInstanceProvider(), new ClassificationImport TypeDialog(),147 (dialog => ((ClassificationImport TypeDialog)dialog).ImportType));146 Import(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(), 147 (dialog => ((ClassificationImportDialog)dialog).ImportType)); 148 148 } 149 149 private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) { 150 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImport TypeDialog(),151 (dialog => ((TimeSeriesPrognosisImport TypeDialog)dialog).ImportType));152 } 153 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImport TypeDialog importTypeDialog,154 Func<DataAnalysisImport TypeDialog, TImportType> getImportType)150 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(), 151 (dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType)); 152 } 153 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog, 154 Func<DataAnalysisImportDialog, TImportType> getImportType) 155 155 where TProblemData : class, IDataAnalysisProblemData 156 156 where TImportType : DataAnalysisImportType { 157 if (import TypeDialog.ShowDialog() == DialogResult.OK) {157 if (importDialog.ShowDialog() == DialogResult.OK) { 158 158 Task.Run(() => { 159 159 TProblemData instance; … … 167 167 instanceProvider.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 168 168 169 instance = instanceProvider.ImportData(import TypeDialog.Path, getImportType(importTypeDialog), importTypeDialog.CSVFormat);169 instance = instanceProvider.ImportData(importDialog.Path, getImportType(importDialog), importDialog.CSVFormat); 170 170 } catch (IOException ex) { 171 171 MessageBox.Show(string.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error); … … 176 176 Content.Import(instance); 177 177 } catch (IOException ex) { 178 MessageBox.Show(string.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(import TypeDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance");178 MessageBox.Show(string.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance"); 179 179 } finally { 180 180 mainForm.RemoveOperationProgressFromContent(activeView.Content); -
stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationInstanceProviderView.cs
r14186 r15197 41 41 42 42 protected override void importButton_Click(object sender, EventArgs e) { 43 var importTypeDialog = new ClassificationImport TypeDialog();43 var importTypeDialog = new ClassificationImportDialog(); 44 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 45 IClassificationProblemData instance = null; -
stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClusteringInstanceProviderView.cs
r14186 r15197 41 41 42 42 protected override void importButton_Click(object sender, EventArgs e) { 43 var importTypeDialog = new DataAnalysisImport TypeDialog();43 var importTypeDialog = new DataAnalysisImportDialog(); 44 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 45 IClusteringProblemData instance = null; -
stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceProviderView.cs
r14186 r15197 39 39 var provider = Content as DataAnalysisInstanceProvider<T, DataAnalysisImportType>; 40 40 if (provider != null) { 41 var importTypeDialog = new DataAnalysisImport TypeDialog();41 var importTypeDialog = new DataAnalysisImportDialog(); 42 42 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 43 43 T instance = default(T); -
stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj
r11920 r15197 93 93 </ItemGroup> 94 94 <ItemGroup> 95 <Compile Include="ClassificationImport TypeDialog.cs">96 <SubType>Form</SubType> 97 </Compile> 98 <Compile Include="ClassificationImport TypeDialog.Designer.cs">99 <DependentUpon>ClassificationImport TypeDialog.cs</DependentUpon>95 <Compile Include="ClassificationImportDialog.cs"> 96 <SubType>Form</SubType> 97 </Compile> 98 <Compile Include="ClassificationImportDialog.Designer.cs"> 99 <DependentUpon>ClassificationImportDialog.cs</DependentUpon> 100 100 </Compile> 101 101 <Compile Include="ClassificationInstanceProviderView.cs"> … … 111 111 <DependentUpon>ClusteringInstanceProviderView.cs</DependentUpon> 112 112 </Compile> 113 <Compile Include="TimeSeriesPrognosisImportTypeDialog.cs"> 114 <SubType>Form</SubType> 115 </Compile> 116 <Compile Include="TimeSeriesPrognosisImportTypeDialog.Designer.cs"> 117 <DependentUpon>TimeSeriesPrognosisImportTypeDialog.cs</DependentUpon> 113 <Compile Include="DataAnalysisImportDialog.cs"> 114 <SubType>Form</SubType> 115 </Compile> 116 <Compile Include="DataAnalysisImportDialog.Designer.cs"> 117 <DependentUpon>DataAnalysisImportDialog.cs</DependentUpon> 118 </Compile> 119 <Compile Include="RegressionImportDialog.cs"> 120 <SubType>Form</SubType> 121 </Compile> 122 <Compile Include="RegressionImportDialog.Designer.cs"> 123 <DependentUpon>RegressionImportDialog.cs</DependentUpon> 124 </Compile> 125 <Compile Include="TimeSeriesPrognosisImportDialog.cs"> 126 <SubType>Form</SubType> 127 </Compile> 128 <Compile Include="TimeSeriesPrognosisImportDialog.Designer.cs"> 129 <DependentUpon>TimeSeriesPrognosisImportDialog.cs</DependentUpon> 118 130 </Compile> 119 131 <Compile Include="TimeSeriesPrognosisInstanceProviderView.cs"> … … 123 135 <DependentUpon>TimeSeriesPrognosisInstanceProviderView.cs</DependentUpon> 124 136 </Compile> 125 <Compile Include="DataAnalysisImportTypeDialog.cs">126 <SubType>Form</SubType>127 </Compile>128 <Compile Include="DataAnalysisImportTypeDialog.Designer.cs">129 <DependentUpon>DataAnalysisImportTypeDialog.cs</DependentUpon>130 </Compile>131 137 <Compile Include="DataAnalysisInstanceProviderView.cs"> 132 138 <SubType>UserControl</SubType> … … 136 142 </Compile> 137 143 <Compile Include="Plugin.cs" /> 138 <Compile Include="RegressionImportTypeDialog.cs">139 <SubType>Form</SubType>140 </Compile>141 <Compile Include="RegressionImportTypeDialog.Designer.cs">142 <DependentUpon>RegressionImportTypeDialog.cs</DependentUpon>143 </Compile>144 144 <Compile Include="RegressionInstanceProviderView.cs"> 145 145 <SubType>UserControl</SubType> -
stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r15170 r15197 42 42 43 43 protected override void importButton_Click(object sender, EventArgs e) { 44 var importTypeDialog = new RegressionImport TypeDialog();44 var importTypeDialog = new RegressionImportDialog(); 45 45 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 46 46 IRegressionProblemData instance = null; -
stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisInstanceProviderView.cs
r14186 r15197 41 41 42 42 protected override void importButton_Click(object sender, EventArgs e) { 43 var importTypeDialog = new TimeSeriesPrognosisImport TypeDialog();43 var importTypeDialog = new TimeSeriesPrognosisImportDialog(); 44 44 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 45 45 ITimeSeriesPrognosisProblemData instance = null;
Note: See TracChangeset
for help on using the changeset viewer.