Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/18/13 15:39:53 (11 years ago)
Author:
tsteinre
Message:
  • created Interface IDataPreprocessorStarter for removing depedencies from Problems.DataAnalyis.Views to DataPreprocessing
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  
    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.