- Timestamp:
- 12/18/13 15:39:53 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r10134 r10250 169 169 <DependentUpon>FeatureCorrelationView.cs</DependentUpon> 170 170 </Compile> 171 <Compile Include="Interfaces\IDataPreprocessorStarter.cs" /> 171 172 <Compile Include="MenuItems\ShrinkDataAnalysisRunsMenuItem.cs" /> 172 173 <Compile Include="Plugin.cs" /> … … 390 391 <Name>HeuristicLab.Data.Views-3.3</Name> 391 392 <Private>False</Private> 392 </ProjectReference>393 <ProjectReference Include="..\..\HeuristicLab.DataPreprocessing\3.3\HeuristicLab.DataPreprocessing-3.3.csproj">394 <Project>{3b90f866-70f8-43ef-a541-51819d255b7b}</Project>395 <Name>HeuristicLab.DataPreprocessing-3.3</Name>396 393 </ProjectReference> 397 394 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Plugin.cs.frame
r10219 r10250 44 44 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 45 45 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")] 46 [PluginDependency("HeuristicLab.DataPreprocessing", "3.3")]47 46 public class HeuristicLabProblemsDataAnalysisViewsPlugin : PluginBase { 48 47 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.Designer.cs
r10236 r10250 47 47 this.FeatureCorrelationButton = new System.Windows.Forms.Button(); 48 48 this.DataPreprocessingButton = new System.Windows.Forms.Button(); 49 this.button1 = new System.Windows.Forms.Button();50 49 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 51 50 this.SuspendLayout(); … … 83 82 this.DataPreprocessingButton.Click += new System.EventHandler(this.DataPreprocessingButton_Click); 84 83 // 85 // button186 //87 this.button1.Location = new System.Drawing.Point(438, 45);88 this.button1.Name = "button1";89 this.button1.Size = new System.Drawing.Size(49, 24);90 this.button1.TabIndex = 6;91 this.button1.Text = "Data Preprocessing";92 this.button1.UseVisualStyleBackColor = true;93 this.button1.Click += new System.EventHandler(this.button1_Click);94 //95 84 // ProblemDataView 96 85 // 97 86 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 98 87 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 99 this.Controls.Add(this.button1);100 88 this.Controls.Add(this.DataPreprocessingButton); 101 89 this.Controls.Add(this.FeatureCorrelationButton); … … 107 95 this.Controls.SetChildIndex(this.FeatureCorrelationButton, 0); 108 96 this.Controls.SetChildIndex(this.DataPreprocessingButton, 0); 109 this.Controls.SetChildIndex(this.button1, 0);110 97 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 111 98 this.ResumeLayout(false); … … 118 105 protected System.Windows.Forms.Button FeatureCorrelationButton; 119 106 protected System.Windows.Forms.Button DataPreprocessingButton; 120 protected System.Windows.Forms.Button button1;121 107 122 108 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs
r10240 r10250 27 27 using HeuristicLab.Core.Views; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.DataPreprocessing;30 29 using HeuristicLab.MainForm; 31 30 using HeuristicLab.MainForm.WindowsForms; 32 31 using HeuristicLab.Optimization; 32 using HeuristicLab.PluginInfrastructure; 33 33 34 34 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 104 104 105 105 private void DataPreprocessingButton_Click(object sender, EventArgs e) { 106 IAlgorithm algorithm;107 IItem parentItem = GetMostOuterContent(out algorithm);108 var preprocessingData = new PreprocessingData(Content);109 110 106 // TODO: ProblemDataView depends on DataPreprocessing 111 //ApplicationManager.Manager.GetInstances<IPreprocessingContext>(); 112 var context = new PreprocessingContext(preprocessingData, parentItem, Content, algorithm); 113 MainFormManager.MainForm.ShowContent(context); 114 } 115 116 private IItem GetMostOuterContent(out IAlgorithm algorithm) { 117 algorithm = null; 118 Control control = this; 119 ItemView itemView = null; 120 do { 121 control = control.Parent; 122 if (control is ItemView) { 123 itemView = (ItemView)control; 124 if (itemView.Content is IAlgorithm) { 125 algorithm = (IAlgorithm)itemView.Content; 126 } 127 } 128 } while (control != null); 129 130 return itemView.Content; 131 } 132 133 private void button1_Click(object sender, EventArgs e) { 134 Type viewType = MainFormManager.GetViewTypes(typeof(IDataGridContent), true).FirstOrDefault(t => typeof(DataGridContentView).IsAssignableFrom(t)); 135 MainFormManager.MainForm.ShowContent(new DataGridContent(new PreprocessingData(Content)), viewType); 107 var preprocessingStarters = ApplicationManager.Manager.GetInstances<IDataPreprocessorStarter>(); 108 var starter = preprocessingStarters.FirstOrDefault(); 109 // TODO: handle possible multiple starters 110 if (starter != null) { 111 starter.Start(Content, this); 112 } 136 113 } 137 114 }
Note: See TracChangeset
for help on using the changeset viewer.