Changeset 7953 for branches/DataAnalysisService
- Timestamp:
- 06/04/12 16:27:13 (13 years ago)
- Location:
- branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3
- Files:
-
- 2 added
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/DataAnalysisExperimentWizard.cs
r7944 r7953 11 11 wizard.Text = "Data Analysis Service"; 12 12 wizard.AddPage(new ProblemDataPage(context)); 13 wizard.AddPage(new ProblemDataViewPage(context));13 wizard.AddPage(new TargetVariablePage(context)); 14 14 wizard.AddPage(new SelectAnalysisPage(context)); 15 15 wizard.AddPage(new WizardPage()); -
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard.csproj
r7944 r7953 142 142 <DependentUpon>ProblemDataPage.cs</DependentUpon> 143 143 </Compile> 144 <Compile Include=" ProblemDataViewPage.cs">145 <SubType>UserControl</SubType> 146 </Compile> 147 <Compile Include=" ProblemDataViewPage.Designer.cs">148 <DependentUpon> ProblemDataViewPage.cs</DependentUpon>144 <Compile Include="TargetVariablePage.cs"> 145 <SubType>UserControl</SubType> 146 </Compile> 147 <Compile Include="TargetVariablePage.Designer.cs"> 148 <DependentUpon>TargetVariablePage.cs</DependentUpon> 149 149 </Compile> 150 150 <Compile Include="Properties\AssemblyInfo.cs" /> … … 177 177 <DependentUpon>ProblemDataPage.cs</DependentUpon> 178 178 </EmbeddedResource> 179 <EmbeddedResource Include=" ProblemDataViewPage.resx">180 <DependentUpon> ProblemDataViewPage.cs</DependentUpon>179 <EmbeddedResource Include="TargetVariablePage.resx"> 180 <DependentUpon>TargetVariablePage.cs</DependentUpon> 181 181 </EmbeddedResource> 182 182 <EmbeddedResource Include="ResultPage.resx"> -
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/Plugin.cs.frame
r7939 r7953 30 30 [PluginDependency("HeuristicLab.Algorithms.DataAnalysis.Views", "3.4")] 31 31 [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")] 32 [PluginDependency("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm", "3.3")] 33 [PluginDependency("HeuristicLab.Clients.Hive", "3.3")] 34 [PluginDependency("HeuristicLab.Clients.HiveJobManager", "3.3")] 32 35 [PluginDependency("HeuristicLab.Collections", "3.3")] 33 36 [PluginDependency("HeuristicLab.Common", "3.3")] … … 38 41 [PluginDependency("HeuristicLab.Data.Views", "3.3")] 39 42 [PluginDependency("HeuristicLab.Encodings.ParameterConfigurationTreeEncoding", "3.3")] 43 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")] 40 44 [PluginDependency("HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard", "3.3")] 45 [PluginDependency("HeuristicLab.Hive", "3.3")] 41 46 [PluginDependency("HeuristicLab.MainForm", "3.3")] 42 47 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 48 [PluginDependency("HeuristicLab.Operators", "3.3")] 43 49 [PluginDependency("HeuristicLab.Optimization", "3.3")] 44 50 [PluginDependency("HeuristicLab.Optimization.Views", "3.3")] … … 47 53 [PluginDependency("HeuristicLab.Parameters.Views", "3.3")] 48 54 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 55 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] 56 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Regression", "3.4")] 49 57 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views", "3.4")] 50 58 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 51 59 [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")] 60 [PluginDependency("HeuristicLab.Selection", "3.3")] 52 61 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")] 53 62 public class HeuristicLabExperimentGenerationDataAnalysisExperimentWizardPlugin : PluginBase { -
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/ProblemDataPage.Designer.cs
r7939 r7953 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.problemView = new HeuristicLab.Optimization.Views.ProblemView(); 26 this.label1 = new System.Windows.Forms.Label(); 27 this.txtFilePath = new System.Windows.Forms.TextBox(); 28 this.btnChooseFile = new System.Windows.Forms.Button(); 29 this.label2 = new System.Windows.Forms.Label(); 30 this.stringConvertibleMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView(); 27 31 this.SuspendLayout(); 28 32 // … … 30 34 // 31 35 this.wizardBanner.Size = new System.Drawing.Size(640, 81); 36 this.wizardBanner.Subtitle = "Select the CSV file containing the data."; 37 this.wizardBanner.Title = "Data File"; 32 38 // 33 // problemView39 // label1 34 40 // 35 this.problemView.Caption = "Problem View"; 36 this.problemView.Content = null; 37 this.problemView.Dock = System.Windows.Forms.DockStyle.Fill; 38 this.problemView.Location = new System.Drawing.Point(0, 81); 39 this.problemView.Name = "problemView"; 40 this.problemView.ReadOnly = false; 41 this.problemView.Size = new System.Drawing.Size(640, 399); 42 this.problemView.TabIndex = 1; 41 this.label1.AutoSize = true; 42 this.label1.Location = new System.Drawing.Point(3, 90); 43 this.label1.Name = "label1"; 44 this.label1.Size = new System.Drawing.Size(95, 13); 45 this.label1.TabIndex = 2; 46 this.label1.Text = "Choose a CSV file:"; 47 // 48 // txtFilePath 49 // 50 this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 51 | System.Windows.Forms.AnchorStyles.Right))); 52 this.txtFilePath.Enabled = false; 53 this.txtFilePath.Location = new System.Drawing.Point(104, 87); 54 this.txtFilePath.Name = "txtFilePath"; 55 this.txtFilePath.Size = new System.Drawing.Size(501, 20); 56 this.txtFilePath.TabIndex = 3; 57 // 58 // btnChooseFile 59 // 60 this.btnChooseFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 61 this.btnChooseFile.Location = new System.Drawing.Point(611, 85); 62 this.btnChooseFile.Name = "btnChooseFile"; 63 this.btnChooseFile.Size = new System.Drawing.Size(26, 23); 64 this.btnChooseFile.TabIndex = 4; 65 this.btnChooseFile.Text = "..."; 66 this.btnChooseFile.UseVisualStyleBackColor = true; 67 this.btnChooseFile.Click += new System.EventHandler(this.btnChooseFile_Click); 68 // 69 // label2 70 // 71 this.label2.AutoSize = true; 72 this.label2.Location = new System.Drawing.Point(3, 124); 73 this.label2.Name = "label2"; 74 this.label2.Size = new System.Drawing.Size(72, 13); 75 this.label2.TabIndex = 5; 76 this.label2.Text = "Preview data:"; 77 // 78 // stringConvertibleMatrixView 79 // 80 this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 81 | System.Windows.Forms.AnchorStyles.Left) 82 | System.Windows.Forms.AnchorStyles.Right))); 83 this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View"; 84 this.stringConvertibleMatrixView.Content = null; 85 this.stringConvertibleMatrixView.Location = new System.Drawing.Point(6, 140); 86 this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView"; 87 this.stringConvertibleMatrixView.ReadOnly = false; 88 this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = true; 89 this.stringConvertibleMatrixView.ShowStatisticalInformation = true; 90 this.stringConvertibleMatrixView.Size = new System.Drawing.Size(631, 337); 91 this.stringConvertibleMatrixView.TabIndex = 6; 43 92 // 44 93 // ProblemDataPage … … 46 95 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 47 96 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 48 this.Controls.Add(this.problemView); 97 this.Controls.Add(this.stringConvertibleMatrixView); 98 this.Controls.Add(this.label2); 99 this.Controls.Add(this.btnChooseFile); 100 this.Controls.Add(this.txtFilePath); 101 this.Controls.Add(this.label1); 49 102 this.Name = "ProblemDataPage"; 50 103 this.Size = new System.Drawing.Size(640, 480); … … 52 105 this.WizardNext += new HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPageEventHandler(this.ProblemDataPage_WizardNext); 53 106 this.Controls.SetChildIndex(this.wizardBanner, 0); 54 this.Controls.SetChildIndex(this.problemView, 0); 107 this.Controls.SetChildIndex(this.label1, 0); 108 this.Controls.SetChildIndex(this.txtFilePath, 0); 109 this.Controls.SetChildIndex(this.btnChooseFile, 0); 110 this.Controls.SetChildIndex(this.label2, 0); 111 this.Controls.SetChildIndex(this.stringConvertibleMatrixView, 0); 55 112 this.ResumeLayout(false); 113 this.PerformLayout(); 56 114 57 115 } … … 59 117 #endregion 60 118 61 private Optimization.Views.ProblemView problemView; 119 private System.Windows.Forms.Label label1; 120 private System.Windows.Forms.TextBox txtFilePath; 121 private System.Windows.Forms.Button btnChooseFile; 122 private System.Windows.Forms.Label label2; 123 private Data.Views.StringConvertibleMatrixView stringConvertibleMatrixView; 62 124 63 125 } -
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/ProblemDataPage.cs
r7939 r7953 1 using System.ComponentModel; 1 using System; 2 using System.ComponentModel; 3 using System.Windows.Forms; 2 4 using HeuristicLab.Problems.DataAnalysis; 5 using HeuristicLab.Problems.Instances.DataAnalysis; 3 6 4 7 namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard { 5 8 public partial class ProblemDataPage : HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPage { 9 private RegressionProblem problem; 10 private RegressionCSVInstanceProvider instanceProvider; 11 6 12 private DataAnalysisWizardContext context; 7 13 public DataAnalysisWizardContext Context { … … 12 18 InitializeComponent(); 13 19 this.context = context; 14 problemView.Content = new RegressionProblem(); 20 stringConvertibleMatrixView.ReadOnly = true; 21 problem = new RegressionProblem(); 22 instanceProvider = new RegressionCSVInstanceProvider(); 15 23 } 16 24 … … 20 28 21 29 private void ProblemDataPage_WizardNext(object sender, Wizard.WizardPageEventArgs e) { 22 context.Problem = (IDataAnalysisProblem)problemView.Content; 30 context.Problem = problem; 31 } 32 33 private void btnChooseFile_Click(object sender, System.EventArgs e) { 34 OpenFileDialog fileDialog = new OpenFileDialog(); 35 fileDialog.Filter = "csv files (*.csv)|*.csv|All files (*.*)|*.*"; 36 if (fileDialog.ShowDialog() == DialogResult.OK) { 37 try { 38 txtFilePath.Text = fileDialog.FileName; 39 IRegressionProblemData problemData = instanceProvider.LoadData(fileDialog.FileName); 40 problem.Load(problemData); 41 stringConvertibleMatrixView.Content = problem.ProblemData.Dataset; 42 } 43 catch (Exception ex) { 44 MessageBox.Show(String.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error); 45 } 46 } 23 47 } 24 48 }
Note: See TracChangeset
for help on using the changeset viewer.