Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10250


Ignore:
Timestamp:
12/18/13 15:39:53 (10 years ago)
Author:
tsteinre
Message:
  • created Interface IDataPreprocessorStarter for removing depedencies from Problems.DataAnalyis.Views to DataPreprocessing
Location:
branches/DataPreprocessing
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10249 r10250  
    8181    <Compile Include="Interfaces\IPreprocessingDataManipulation.cs" />
    8282    <Compile Include="Implementations\FilterContent.cs" />
     83    <Compile Include="Implementations\DataPreprocessorStarter.cs" />
    8384    <Compile Include="Implementations\FilterLogic.cs" />
    8485    <Compile Include="Implementations\HistogramContent.cs" />
     
    106107    <Compile Include="Implementations\SearchLogic.cs" />
    107108    <Compile Include="Implementations\StatisticsLogic.cs" />
    108     <Compile Include="Views\DataGridContentView.cs">
    109       <SubType>UserControl</SubType>
    110     </Compile>
     109    <Compile Include="Views\DataGridContentView.cs" />
    111110    <Compile Include="Views\DataGridContentView.Designer.cs">
    112111      <DependentUpon>DataGridContentView.cs</DependentUpon>
     
    178177      <Private>False</Private>
    179178    </ProjectReference>
     179    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Views\3.4\HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj">
     180      <Project>{3e9e8944-44ff-40bb-a622-3a4a7dd0f198}</Project>
     181      <Name>HeuristicLab.Problems.DataAnalysis.Views-3.4</Name>
     182    </ProjectReference>
    180183    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    181184      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs

    r10240 r10250  
    2828  [Item("PreprocessingContext", "PreprocessingContext")]
    2929  public class PreprocessingContext : Item, IPreprocessingContext {
    30     public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm) {
    31       Data = data;
     30    public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IItem parentItem, IAlgorithm algorithm) {
     31      Data = new PreprocessingData(dataAnalysisProblemData);
    3232      ParentItem = parentItem;
    3333      DataAnalysisProblemData = dataAnalysisProblemData;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Plugin.cs.frame

    r10240 r10250  
    3232  [PluginDependency("HeuristicLab.Core", "3.3")]
    3333  [PluginDependency("HeuristicLab.Collections", "3.3")]
     34  [PluginDependency("HeuristicLab.Data","3.3")]
     35  [PluginDependency("HeuristicLab.Data.Views","3.3")]
    3436  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    3537  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     
    3739  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    3840  [PluginDependency("HeuristicLab.Problems.DataAnalysis","3.4")]
     41  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views","3.4")]
    3942  public class HeuristicLabDataPreprocessingPlugin : PluginBase {
    4043  }
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r10134 r10250  
    169169      <DependentUpon>FeatureCorrelationView.cs</DependentUpon>
    170170    </Compile>
     171    <Compile Include="Interfaces\IDataPreprocessorStarter.cs" />
    171172    <Compile Include="MenuItems\ShrinkDataAnalysisRunsMenuItem.cs" />
    172173    <Compile Include="Plugin.cs" />
     
    390391      <Name>HeuristicLab.Data.Views-3.3</Name>
    391392      <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>
    396393    </ProjectReference>
    397394    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Plugin.cs.frame

    r10219 r10250  
    4444  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
    4545  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")]
    46   [PluginDependency("HeuristicLab.DataPreprocessing", "3.3")]
    4746  public class HeuristicLabProblemsDataAnalysisViewsPlugin : PluginBase {
    4847  }
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.Designer.cs

    r10236 r10250  
    4747      this.FeatureCorrelationButton = new System.Windows.Forms.Button();
    4848      this.DataPreprocessingButton = new System.Windows.Forms.Button();
    49       this.button1 = new System.Windows.Forms.Button();
    5049      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5150      this.SuspendLayout();
     
    8382      this.DataPreprocessingButton.Click += new System.EventHandler(this.DataPreprocessingButton_Click);
    8483      //
    85       // button1
    86       //
    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       //
    9584      // ProblemDataView
    9685      //
    9786      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    9887      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    99       this.Controls.Add(this.button1);
    10088      this.Controls.Add(this.DataPreprocessingButton);
    10189      this.Controls.Add(this.FeatureCorrelationButton);
     
    10795      this.Controls.SetChildIndex(this.FeatureCorrelationButton, 0);
    10896      this.Controls.SetChildIndex(this.DataPreprocessingButton, 0);
    109       this.Controls.SetChildIndex(this.button1, 0);
    11097      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    11198      this.ResumeLayout(false);
     
    118105    protected System.Windows.Forms.Button FeatureCorrelationButton;
    119106    protected System.Windows.Forms.Button DataPreprocessingButton;
    120     protected System.Windows.Forms.Button button1;
    121107
    122108  }
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs

    r10240 r10250  
    2727using HeuristicLab.Core.Views;
    2828using HeuristicLab.Data;
    29 using HeuristicLab.DataPreprocessing;
    3029using HeuristicLab.MainForm;
    3130using HeuristicLab.MainForm.WindowsForms;
    3231using HeuristicLab.Optimization;
     32using HeuristicLab.PluginInfrastructure;
    3333
    3434namespace HeuristicLab.Problems.DataAnalysis.Views {
     
    104104
    105105    private void DataPreprocessingButton_Click(object sender, EventArgs e) {
    106       IAlgorithm algorithm;
    107       IItem parentItem = GetMostOuterContent(out algorithm);
    108       var preprocessingData = new PreprocessingData(Content);
    109 
    110106      // 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      }
    136113    }
    137114  }
Note: See TracChangeset for help on using the changeset viewer.