Changeset 15185
- Timestamp:
- 07/10/17 18:59:54 (7 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r15110 r15185 151 151 } 152 152 private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) { 153 Import(new RegressionCSVInstanceProvider(), new RegressionImport TypeDialog(),154 (dialog => ((RegressionImport TypeDialog)dialog).ImportType));153 Import(new RegressionCSVInstanceProvider(), new RegressionImportDialog(), 154 (dialog => ((RegressionImportDialog)dialog).ImportType)); 155 155 } 156 156 private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) { 157 Import(new ClassificationCSVInstanceProvider(), new ClassificationImport TypeDialog(),158 (dialog => ((ClassificationImport TypeDialog)dialog).ImportType));157 Import(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(), 158 (dialog => ((ClassificationImportDialog)dialog).ImportType)); 159 159 } 160 160 private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) { 161 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImport TypeDialog(),162 (dialog => ((TimeSeriesPrognosisImport TypeDialog)dialog).ImportType));163 } 164 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImport TypeDialog importTypeDialog,165 Func<DataAnalysisImport TypeDialog, TImportType> getImportType)161 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(), 162 (dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType)); 163 } 164 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog, 165 Func<DataAnalysisImportDialog, TImportType> getImportType) 166 166 where TProblemData : class, IDataAnalysisProblemData 167 167 where TImportType : DataAnalysisImportType { 168 if (import TypeDialog.ShowDialog() == DialogResult.OK) {168 if (importDialog.ShowDialog() == DialogResult.OK) { 169 169 Task.Run(() => { 170 170 TProblemData instance; … … 178 178 instanceProvider.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 179 179 180 instance = instanceProvider.ImportData(import TypeDialog.Path, getImportType(importTypeDialog), importTypeDialog.CSVFormat);180 instance = instanceProvider.ImportData(importDialog.Path, getImportType(importDialog), importDialog.CSVFormat); 181 181 } catch (IOException ex) { 182 182 MessageBox.Show(string.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error); … … 187 187 Content.Import(instance); 188 188 } catch (IOException ex) { 189 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");189 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"); 190 190 } finally { 191 191 mainForm.RemoveOperationProgressFromContent(activeView.Content); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationImportDialog.Designer.cs
r15184 r15185 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class ClassificationImport TypeDialog {23 partial class ClassificationImportDialog { 24 24 /// <summary> 25 25 /// Required designer variable. … … 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClassificationImport TypeDialog));47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClassificationImportDialog)); 48 48 this.TargetVariableComboBox = new System.Windows.Forms.ComboBox(); 49 49 this.TargetVariableLabel = new System.Windows.Forms.Label(); … … 174 174 this.UniformDistributClassValuesInfoLabel.DoubleClick += new System.EventHandler(this.ControlToolTip_DoubleClick); 175 175 // 176 // ClassificationImport TypeDialog176 // ClassificationImportDialog 177 177 // 178 178 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 179 179 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 180 180 this.ClientSize = new System.Drawing.Size(471, 517); 181 this.Name = "ClassificationImport TypeDialog";181 this.Name = "ClassificationImportDialog"; 182 182 this.Text = "Classification CSV Import"; 183 183 ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit(); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationImportDialog.cs
r15184 r15185 27 27 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 28 28 29 public partial class ClassificationImport TypeDialog : DataAnalysisImportTypeDialog {29 public partial class ClassificationImportDialog : DataAnalysisImportDialog { 30 30 public new ClassificationImportType ImportType { 31 31 get { … … 39 39 } 40 40 41 public ClassificationImport TypeDialog() {41 public ClassificationImportDialog() { 42 42 InitializeComponent(); 43 43 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationInstanceProviderView.cs
r14185 r15185 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClusteringInstanceProviderView.cs
r14185 r15185 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportDialog.Designer.cs
r15184 r15185 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class DataAnalysisImport TypeDialog {23 partial class DataAnalysisImportDialog { 24 24 /// <summary> 25 25 /// Required designer variable. … … 419 419 this.PreviewDatasetMatrix.TabIndex = 0; 420 420 // 421 // DataAnalysisImport TypeDialog421 // DataAnalysisImportDialog 422 422 // 423 423 this.AcceptButton = this.OkButton; … … 434 434 this.MaximizeBox = false; 435 435 this.MinimizeBox = false; 436 this.Name = "DataAnalysisImport TypeDialog";436 this.Name = "DataAnalysisImportDialog"; 437 437 this.ShowIcon = false; 438 438 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportDialog.cs
r15184 r15185 31 31 32 32 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 33 public partial class DataAnalysisImport TypeDialog : Form {33 public partial class DataAnalysisImportDialog : Form { 34 34 35 35 private static readonly List<KeyValuePair<DateTimeFormatInfo, string>> dateTimeFormats = … … 88 88 } 89 89 90 public DataAnalysisImport TypeDialog() {90 public DataAnalysisImportDialog() { 91 91 InitializeComponent(); 92 92 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceProviderView.cs
r14185 r15185 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); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj
r14125 r15185 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> -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionImportDialog.Designer.cs
r15184 r15185 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class RegressionImport TypeDialog {23 partial class RegressionImportDialog { 24 24 /// <summary> 25 25 /// Required designer variable. … … 57 57 this.OkButton.Location = new System.Drawing.Point(303, 421); 58 58 // 59 // Cancel ationButton59 // CancellationButton 60 60 // 61 this.Cancel ationButton.Location = new System.Drawing.Point(384, 421);61 this.CancellationButton.Location = new System.Drawing.Point(384, 421); 62 62 // 63 63 // ProblemDataSettingsGroupBox … … 110 110 this.ToolTip.SetToolTip(this.TargetVariableInfoLabel, (string)this.TargetVariableInfoLabel.Tag); 111 111 // 112 // RegressionImport TypeDialog112 // RegressionImportDialog 113 113 // 114 114 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 115 115 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 116 116 this.ClientSize = new System.Drawing.Size(471, 456); 117 this.Name = "RegressionImport TypeDialog";117 this.Name = "RegressionImportDialog"; 118 118 this.Text = "Regression CSV Import"; 119 119 ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit(); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionImportDialog.cs
r15184 r15185 25 25 26 26 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 27 public partial class RegressionImport TypeDialog : DataAnalysisImportTypeDialog {27 public partial class RegressionImportDialog : DataAnalysisImportDialog { 28 28 public new RegressionImportType ImportType { 29 29 get { … … 36 36 } 37 37 38 public RegressionImport TypeDialog() {38 public RegressionImportDialog() { 39 39 InitializeComponent(); 40 40 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r14298 r15185 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisImportDialog.Designer.cs
r15184 r15185 21 21 22 22 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 23 partial class TimeSeriesPrognosisImport TypeDialog {23 partial class TimeSeriesPrognosisImportDialog { 24 24 /// <summary> 25 25 /// Required designer variable. … … 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TimeSeriesPrognosisImport TypeDialog));47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TimeSeriesPrognosisImportDialog)); 48 48 this.TargetVariableComboBox = new System.Windows.Forms.ComboBox(); 49 49 this.TargetVariableLabel = new System.Windows.Forms.Label(); … … 132 132 this.ToolTip.SetToolTip(this.TargetVariableInfoLabel, (string)this.TargetVariableInfoLabel.Tag); 133 133 // 134 // TimeSeriesPrognosisImport TypeDialog134 // TimeSeriesPrognosisImportDialog 135 135 // 136 136 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 137 137 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 138 138 this.ClientSize = new System.Drawing.Size(471, 457); 139 this.Name = "TimeSeriesPrognosisImport TypeDialog";139 this.Name = "TimeSeriesPrognosisImportDialog"; 140 140 this.Text = "TimeSeries Prognosis CSV Import"; 141 141 ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit(); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisImportDialog.cs
r15184 r15185 25 25 26 26 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views { 27 public partial class TimeSeriesPrognosisImport TypeDialog : DataAnalysisImportTypeDialog {27 public partial class TimeSeriesPrognosisImportDialog : DataAnalysisImportDialog { 28 28 public new TimeSeriesPrognosisImportType ImportType { 29 29 get { … … 37 37 } 38 38 39 public TimeSeriesPrognosisImport TypeDialog() {39 public TimeSeriesPrognosisImportDialog() { 40 40 InitializeComponent(); 41 41 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/TimeSeriesPrognosisInstanceProviderView.cs
r14185 r15185 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.