Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/14 15:08:11 (10 years ago)
Author:
mkommend
Message:

#1758: Reimplemented functionality to load new problem data to data analysis solution and redesigned the according views.

  • Added setter for the target variable of regression and classification problem data.
  • Added functionality to check the compatibility of problem data.
  • Added functionality to adjust the properties of a problem data.
  • Added flowLayoutPanel with according buttons for loading a new problem data, simplifying and exporting data analysis solutions.
  • TradingProblemData currently throws a NotSupportedException when the properties should be adjusted.
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj

    r8636 r10540  
    152152      <Private>False</Private>
    153153    </ProjectReference>
     154    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
     155      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
     156      <Name>HeuristicLab.Common.Resources-3.3</Name>
     157      <Private>False</Private>
     158    </ProjectReference>
    154159    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    155160      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.Designer.cs

    r9973 r10540  
    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      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     
    5355      this.detailsGroupBox.SuspendLayout();
    5456      this.SuspendLayout();
    55       exportButton.Visible = false;
    5657      //
    57       // splitContainer
     58      // flowLayoutPanel
    5859      //
    59       //
    60       // splitContainer.Panel1
    61       //
    62       this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
     60      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
     61      this.flowLayoutPanel.Controls.Add(this.exportButton);
    6362      //
    6463      // btnSimplify
    6564      //
    66       this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    67       this.btnSimplify.Location = new System.Drawing.Point(172, 4);
     65      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     66      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
     67      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    6868      this.btnSimplify.Name = "btnSimplify";
    69       this.btnSimplify.Size = new System.Drawing.Size(75, 23);
    70       this.btnSimplify.TabIndex = 6;
    71       this.btnSimplify.Text = "Simplify";
     69      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
     70      this.btnSimplify.TabIndex = 7;
     71      this.btnSimplify.Text = "Simplify Model";
     72      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    7273      this.btnSimplify.UseVisualStyleBackColor = true;
    7374      this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
     75      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
    7476      //
    75       // SymbolicDiscriminantFunctionClassificationSolutionView
     77      // exportButton
     78      //
     79      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     80      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
     81      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     82      this.exportButton.Name = "exportButton";
     83      this.exportButton.Size = new System.Drawing.Size(105, 24);
     84      this.exportButton.TabIndex = 8;
     85      this.exportButton.Text = "Export to Excel ";
     86      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     87      this.exportButton.UseVisualStyleBackColor = true;
     88      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
     89      //
     90      // SymbolicClassificationSolutionView
    7691      //
    7792      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    88103    #endregion
    89104
     105    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
     106    protected System.Windows.Forms.Button exportButton;
    90107    protected System.Windows.Forms.Button btnSimplify;
    91108  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.cs

    r9456 r10540  
    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      var view = new InteractiveSymbolicClassificationSolutionSimplifierView();
     
    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}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs

    r9973 r10540  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolicDiscriminantFunctionClassificationSolutionView));
     47      this.exportButton = new System.Windows.Forms.Button();
     48      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
    4849      this.btnSimplify = new System.Windows.Forms.Button();
    4950      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     
    5455      this.detailsGroupBox.SuspendLayout();
    5556      this.SuspendLayout();
    56       exportButton.Visible = false;
    5757      //
    58       // splitContainer
     58      // flowLayoutPanel
    5959      //
    60       //
    61       // splitContainer.Panel1
    62       //
    63       this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
     60      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
     61      this.flowLayoutPanel.Controls.Add(this.exportButton);
    6462      //
    6563      // btnSimplify
    6664      //
    67       this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    68       this.btnSimplify.Location = new System.Drawing.Point(172, 4);
     65      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     66      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
     67      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    6968      this.btnSimplify.Name = "btnSimplify";
    70       this.btnSimplify.Size = new System.Drawing.Size(75, 23);
    71       this.btnSimplify.TabIndex = 6;
    72       this.btnSimplify.Text = "Simplify";
     69      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
     70      this.btnSimplify.TabIndex = 7;
     71      this.btnSimplify.Text = "Simplify Model";
     72      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    7373      this.btnSimplify.UseVisualStyleBackColor = true;
    7474      this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
     75      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
     76      //
     77      // exportButton
     78      //
     79      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     80      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
     81      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     82      this.exportButton.Name = "exportButton";
     83      this.exportButton.Size = new System.Drawing.Size(105, 24);
     84      this.exportButton.TabIndex = 8;
     85      this.exportButton.Text = "Export to Excel ";
     86      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     87      this.exportButton.UseVisualStyleBackColor = true;
     88      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
    7589      //
    7690      // SymbolicDiscriminantFunctionClassificationSolutionView
     
    89103    #endregion
    90104
     105    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
     106    protected System.Windows.Forms.Button exportButton;
    91107    protected System.Windows.Forms.Button btnSimplify;
    92108  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs

    r9456 r10540  
    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      var view = new InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView();
     
    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.