Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/14 13:26:18 (10 years ago)
Author:
pfleck
Message:
  • Merged trunk into preprocessing branch.
Location:
branches/DataPreprocessing
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing

  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views

  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj

    r10925 r11009  
    110110  </ItemGroup>
    111111  <ItemGroup>
    112     <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.cs">
    113       <SubType>UserControl</SubType>
    114     </Compile>
     112    <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.cs" />
    115113    <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.Designer.cs">
    116114      <DependentUpon>InteractiveSymbolicRegressionSolutionSimplifierView.cs</DependentUpon>
     
    155153      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    156154      <Name>HeuristicLab.Collections-3.3</Name>
     155      <Private>False</Private>
     156    </ProjectReference>
     157    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
     158      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
     159      <Name>HeuristicLab.Common.Resources-3.3</Name>
    157160      <Private>False</Private>
    158161    </ProjectReference>
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Plugin.cs.frame

    r10925 r11009  
    3131  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3232  [PluginDependency("HeuristicLab.Common", "3.3")]
     33  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3334  [PluginDependency("HeuristicLab.Core", "3.3")]
    3435  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs

    r10878 r11009  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.exportButton = new System.Windows.Forms.Button();
     48      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
    4749      this.btnSimplify = new System.Windows.Forms.Button();
    4850      this.transformModelButton = new System.Windows.Forms.Button();
     
    5557      this.SuspendLayout();
    5658      //
    57       // splitContainer
     59      // flowLayoutPanel
    5860      //
    59       //
    60       // splitContainer.Panel1
    61       //
    62       this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
    63       //
    64       // splitContainer.Panel2
    65       //
    66       this.splitContainer.Panel2.Controls.Add(this.transformModelButton);
    67       //
    68       // addButton
    69       //
    70       this.toolTip.SetToolTip(this.addButton, "Add");
    71       //
    72       // removeButton
    73       //
    74       this.toolTip.SetToolTip(this.removeButton, "Remove");
     61      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
     62      this.flowLayoutPanel.Controls.Add(this.exportButton);
     63      this.flowLayoutPanel.Controls.Add(this.transformModelButton);
    7564      //
    7665      // btnSimplify
    7766      //
    78       this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    79       this.btnSimplify.Location = new System.Drawing.Point(172, 4);
     67      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     68      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
     69      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    8070      this.btnSimplify.Name = "btnSimplify";
    81       this.btnSimplify.Size = new System.Drawing.Size(75, 23);
    82       this.btnSimplify.TabIndex = 6;
    83       this.btnSimplify.Text = "Simplify";
     71      this.btnSimplify.TabIndex = 7;
     72      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
     73      this.btnSimplify.Text = "Simplify Model";
     74      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    8475      this.btnSimplify.UseVisualStyleBackColor = true;
    8576      this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
     77      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
     78      //
     79      // exportButton
     80      //
     81      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     82      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
     83      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     84      this.exportButton.Name = "exportButton";
     85      this.exportButton.Size = new System.Drawing.Size(105, 24);
     86      this.exportButton.TabIndex = 8;
     87      this.exportButton.Text = "Export to Excel ";
     88      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     89      this.exportButton.UseVisualStyleBackColor = true;
     90      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
     91      this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel.");
    8692      //
    8793      // transformModelButton
    8894      //
    89       this.transformModelButton.Location = new System.Drawing.Point(84, 3);
     95      this.transformModelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     96      this.transformModelButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Event;
     97      this.transformModelButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    9098      this.transformModelButton.Name = "transformModelButton";
    91       this.transformModelButton.Size = new System.Drawing.Size(125, 23);
    92       this.transformModelButton.TabIndex = 8;
     99      this.transformModelButton.Size = new System.Drawing.Size(135, 23);
     100      this.transformModelButton.TabIndex = 9;
    93101      this.transformModelButton.Text = "Backtransform Model";
     102      this.transformModelButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    94103      this.transformModelButton.UseVisualStyleBackColor = true;
    95104      this.transformModelButton.Click += new System.EventHandler(this.transformModelButton_Click);
     105      this.toolTip.SetToolTip(this.transformModelButton, "Backtransform model based on the stored transformations.");
    96106      //
    97107      // SymbolicRegressionSolutionView
     
    110120
    111121    #endregion
    112     private System.Windows.Forms.Button btnSimplify;
    113     private System.Windows.Forms.Button transformModelButton;
     122    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
     123    protected System.Windows.Forms.Button exportButton;
     124    protected System.Windows.Forms.Button btnSimplify;
     125    protected System.Windows.Forms.Button transformModelButton;
    114126  }
    115127}
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs

    r10880 r11009  
    2121
    2222using System;
     23using System.ComponentModel;
    2324using System.Windows.Forms;
    2425using HeuristicLab.MainForm;
     26using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
    2527using HeuristicLab.Problems.DataAnalysis.Views;
    2628
     
    4042    protected override void SetEnabledStateOfControls() {
    4143      base.SetEnabledStateOfControls();
    42       if (Content == null) {
    43         transformModelButton.Enabled = false;
    44       } else {
    45         transformModelButton.Enabled = !Locked;
    46       }
     44      btnSimplify.Enabled = Content != null && !Locked;
     45      exportButton.Enabled = Content != null && !Locked;
     46      transformModelButton.Enabled = Content != null && !Locked;
    4747    }
    4848
     
    5353    }
    5454
     55    private void exportButton_Click(object sender, EventArgs e) {
     56      var exporter = new SymbolicSolutionExcelExporter();
     57      exportFileDialog.Filter = exporter.FileTypeFilter;
     58      if (exportFileDialog.ShowDialog(this) == DialogResult.OK) {
     59        var name = exportFileDialog.FileName;
     60        using (BackgroundWorker bg = new BackgroundWorker()) {
     61          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exporting solution to " + name + ".");
     62          bg.DoWork += (o, a) => exporter.Export(Content, name);
     63          bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
     64          bg.RunWorkerAsync();
     65        }
     66      }
     67    }
     68
    5569    private void transformModelButton_Click(object sender, EventArgs e) {
    5670      var mapper = new TransformationToSymbolicTreeMapper();
     
    5872      var transformations = Content.ProblemData.Transformations;
    5973      var targetVar = Content.ProblemData.TargetVariable;
    60 
    6174      transformator.Backtransform(Content.Model, transformations, targetVar);
    6275      // TODO: cloning is needed for refreshing the view, find a better approach for this.
Note: See TracChangeset for help on using the changeset viewer.