Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/14 19:03:36 (10 years ago)
Author:
mkommend
Message:

#1758: Merged r10173:10176 and r10540, r10541, r10543, r10545 and r11031 into stable.

Location:
stable
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views

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

    r8600 r11144  
    157157      <Private>False</Private>
    158158    </ProjectReference>
     159    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
     160      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
     161      <Name>HeuristicLab.Common.Resources-3.3</Name>
     162      <Private>False</Private>
     163    </ProjectReference>
    159164    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    160165      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     
    284289  -->
    285290  <PropertyGroup>
    286    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     291    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    287292set ProjectDir=$(ProjectDir)
    288293set SolutionDir=$(SolutionDir)
     
    291296call PreBuildEvent.cmd
    292297</PreBuildEvent>
    293 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     298    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    294299export ProjectDir=$(ProjectDir)
    295300export SolutionDir=$(SolutionDir)
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Plugin.cs.frame

    r10032 r11144  
    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")]
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs

    r9999 r11144  
    1919 */
    2020#endregion
     21
    2122
    2223namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
     
    4546    /// </summary>
    4647    private void InitializeComponent() {
     48      this.exportButton = new System.Windows.Forms.Button();
     49      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
    4750      this.btnSimplify = new System.Windows.Forms.Button();
    4851      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     
    5457      this.SuspendLayout();
    5558      //
    56       // splitContainer
     59      // flowLayoutPanel
    5760      //
    58       //
    59       // splitContainer.Panel1
    60       //
    61       this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
    62       //
    63       // addButton
    64       //
    65       this.toolTip.SetToolTip(this.addButton, "Add");
    66       //
    67       // removeButton
    68       //
    69       this.toolTip.SetToolTip(this.removeButton, "Remove");
     61      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
     62      this.flowLayoutPanel.Controls.Add(this.exportButton);
    7063      //
    7164      // btnSimplify
    7265      //
    73       this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    74       this.btnSimplify.Location = new System.Drawing.Point(172, 4);
     66      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     67      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
     68      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    7569      this.btnSimplify.Name = "btnSimplify";
    76       this.btnSimplify.Size = new System.Drawing.Size(75, 23);
    77       this.btnSimplify.TabIndex = 6;
    78       this.btnSimplify.Text = "Simplify";
     70      this.btnSimplify.TabIndex = 7;
     71      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
     72      this.btnSimplify.Text = "Simplify Model";
     73      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    7974      this.btnSimplify.UseVisualStyleBackColor = true;
    8075      this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
     76      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
     77      //
     78      // exportButton
     79      //
     80      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     81      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
     82      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     83      this.exportButton.Name = "exportButton";
     84      this.exportButton.Size = new System.Drawing.Size(105, 24);
     85      this.exportButton.TabIndex = 8;
     86      this.exportButton.Text = "Export to Excel ";
     87      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     88      this.exportButton.UseVisualStyleBackColor = true;
     89      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
     90      this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel.");
    8191      //
    8292      // SymbolicRegressionSolutionView
     
    95105
    96106    #endregion
    97     private System.Windows.Forms.Button btnSimplify;
     107    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
     108    protected System.Windows.Forms.Button exportButton;
     109    protected System.Windows.Forms.Button btnSimplify;
    98110  }
    99111}
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs

    r10920 r11144  
    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
     
    3840    }
    3941
     42    protected override void SetEnabledStateOfControls() {
     43      base.SetEnabledStateOfControls();
     44      btnSimplify.Enabled = Content != null && !Locked;
     45      exportButton.Enabled = Content != null && !Locked;
     46    }
     47
    4048    private void btn_SimplifyModel_Click(object sender, EventArgs e) {
    4149      InteractiveSymbolicRegressionSolutionSimplifierView view = new InteractiveSymbolicRegressionSolutionSimplifierView();
     
    4351      view.Show();
    4452    }
     53
     54    private void exportButton_Click(object sender, EventArgs e) {
     55      var exporter = new SymbolicSolutionExcelExporter();
     56      exportFileDialog.Filter = exporter.FileTypeFilter;
     57      if (exportFileDialog.ShowDialog(this) == DialogResult.OK) {
     58
     59        var name = exportFileDialog.FileName;
     60        using (BackgroundWorker bg = new BackgroundWorker()) {
     61          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion 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    }
    4568  }
    4669}
Note: See TracChangeset for help on using the changeset viewer.