Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14917


Ignore:
Timestamp:
05/03/17 16:17:12 (7 years ago)
Author:
pfleck
Message:

#2709

  • Use the new icons for PreprocessingCheckedVariablesView (linechart, histogram).
  • Added a "lock aspect ratio" sizing for the multi scatter plot.
  • Fixed a bug in single scatter plot when changing the regression line.
Location:
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.Designer.cs

    r14514 r14917  
    9090      // uncheckAllButton
    9191      //
     92      this.uncheckAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.None;
    9293      this.uncheckAllButton.Location = new System.Drawing.Point(66, 19);
    9394      this.uncheckAllButton.Name = "uncheckAllButton";
    9495      this.uncheckAllButton.Size = new System.Drawing.Size(24, 24);
    9596      this.uncheckAllButton.TabIndex = 7;
    96       this.uncheckAllButton.Text = "N";
    97       this.toolTip.SetToolTip(this.uncheckAllButton, "Uncheck all variables");
     97      this.toolTip.SetToolTip(this.uncheckAllButton, "None");
    9898      this.uncheckAllButton.UseVisualStyleBackColor = true;
    9999      this.uncheckAllButton.Click += new System.EventHandler(this.uncheckAllButton_Click);
     
    101101      // checkAllButton
    102102      //
    103       this.checkAllButton.Location = new System.Drawing.Point(36, 19);
     103      this.checkAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.All;
     104      this.checkAllButton.Location = new System.Drawing.Point(6, 19);
    104105      this.checkAllButton.Name = "checkAllButton";
    105106      this.checkAllButton.Size = new System.Drawing.Size(24, 24);
    106107      this.checkAllButton.TabIndex = 7;
    107       this.checkAllButton.Text = "A";
    108       this.toolTip.SetToolTip(this.checkAllButton, "Check all variables");
     108      this.toolTip.SetToolTip(this.checkAllButton, "All");
    109109      this.checkAllButton.UseVisualStyleBackColor = true;
    110110      this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click);
     
    112112      // checkInputsTargetButton
    113113      //
    114       this.checkInputsTargetButton.Location = new System.Drawing.Point(6, 19);
     114      this.checkInputsTargetButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.Inputs;
     115      this.checkInputsTargetButton.Location = new System.Drawing.Point(36, 19);
    115116      this.checkInputsTargetButton.Name = "checkInputsTargetButton";
    116117      this.checkInputsTargetButton.Size = new System.Drawing.Size(24, 24);
    117118      this.checkInputsTargetButton.TabIndex = 7;
    118       this.checkInputsTargetButton.Text = "I";
    119       this.toolTip.SetToolTip(this.checkInputsTargetButton, "Check only inputs and target variable");
     119      this.toolTip.SetToolTip(this.checkInputsTargetButton, "Inputs & Target");
    120120      this.checkInputsTargetButton.UseVisualStyleBackColor = true;
    121121      this.checkInputsTargetButton.Click += new System.EventHandler(this.checkInputsTargetButton_Click);
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.cs

    r14511 r14917  
    2525using System.Windows.Forms;
    2626using HeuristicLab.Collections;
    27 using HeuristicLab.Common.Resources;
    2827using HeuristicLab.Core.Views;
    2928using HeuristicLab.Data;
     
    4443    protected PreprocessingCheckedVariablesView() {
    4544      InitializeComponent();
    46       checkInputsTargetButton.Text = string.Empty;
    47       checkInputsTargetButton.Image = VSImageLibrary.Namespace;
    48       checkAllButton.Text = string.Empty;
    49       checkAllButton.Image = VSImageLibrary.Expand;
    50       uncheckAllButton.Text = string.Empty;
    51       uncheckAllButton.Image = VSImageLibrary.Collapse;
    5245    }
    5346
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs

    r14902 r14917  
    5757      this.heightLabel = new System.Windows.Forms.Label();
    5858      this.widthLabel = new System.Windows.Forms.Label();
     59      this.lockAspectCheckBox = new System.Windows.Forms.CheckBox();
    5960      this.regressionGroupBox = new System.Windows.Forms.GroupBox();
    6061      this.regressionTypeComboBox = new System.Windows.Forms.ComboBox();
     
    198199      this.sizeGroupBox.Controls.Add(this.heightLabel);
    199200      this.sizeGroupBox.Controls.Add(this.widthLabel);
     201      this.sizeGroupBox.Controls.Add(this.lockAspectCheckBox);
    200202      this.sizeGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
    201       this.sizeGroupBox.Location = new System.Drawing.Point(0, 212);
     203      this.sizeGroupBox.Location = new System.Drawing.Point(0, 179);
    202204      this.sizeGroupBox.Name = "sizeGroupBox";
    203       this.sizeGroupBox.Size = new System.Drawing.Size(180, 72);
     205      this.sizeGroupBox.Size = new System.Drawing.Size(180, 95);
    204206      this.sizeGroupBox.TabIndex = 5;
    205207      this.sizeGroupBox.TabStop = false;
     
    211213            | System.Windows.Forms.AnchorStyles.Right)));
    212214      this.heightNumericUpDown.Increment = new decimal(new int[] {
    213             100,
     215            50,
    214216            0,
    215217            0,
     
    225227      this.heightNumericUpDown.TabIndex = 4;
    226228      this.heightNumericUpDown.Value = new decimal(new int[] {
    227             300,
     229            225,
    228230            0,
    229231            0,
     
    236238            | System.Windows.Forms.AnchorStyles.Right)));
    237239      this.widthNumericUpDown.Increment = new decimal(new int[] {
    238             100,
     240            50,
    239241            0,
    240242            0,
     
    250252      this.widthNumericUpDown.TabIndex = 3;
    251253      this.widthNumericUpDown.Value = new decimal(new int[] {
    252             400,
     254            300,
    253255            0,
    254256            0,
     
    274276      this.widthLabel.Text = "Width:";
    275277      //
     278      // lockAspectCheckBox
     279      //
     280      this.lockAspectCheckBox.AutoSize = true;
     281      this.lockAspectCheckBox.Checked = true;
     282      this.lockAspectCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     283      this.lockAspectCheckBox.Location = new System.Drawing.Point(50, 66);
     284      this.lockAspectCheckBox.Name = "lockAspectCheckBox";
     285      this.lockAspectCheckBox.Size = new System.Drawing.Size(114, 17);
     286      this.lockAspectCheckBox.TabIndex = 6;
     287      this.lockAspectCheckBox.Text = "Lock Aspect Ratio";
     288      this.lockAspectCheckBox.UseVisualStyleBackColor = true;
     289      //
    276290      // regressionGroupBox
    277291      //
     
    281295      this.regressionGroupBox.Controls.Add(this.label4);
    282296      this.regressionGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
    283       this.regressionGroupBox.Location = new System.Drawing.Point(0, 328);
     297      this.regressionGroupBox.Location = new System.Drawing.Point(0, 324);
    284298      this.regressionGroupBox.Name = "regressionGroupBox";
    285       this.regressionGroupBox.Size = new System.Drawing.Size(180, 75);
     299      this.regressionGroupBox.Size = new System.Drawing.Size(180, 79);
    286300      this.regressionGroupBox.TabIndex = 3;
    287301      this.regressionGroupBox.TabStop = false;
     
    348362      this.groupingOptionsBox.Controls.Add(this.groupingComboBox);
    349363      this.groupingOptionsBox.Dock = System.Windows.Forms.DockStyle.Bottom;
    350       this.groupingOptionsBox.Location = new System.Drawing.Point(0, 284);
     364      this.groupingOptionsBox.Location = new System.Drawing.Point(0, 274);
    351365      this.groupingOptionsBox.Name = "groupingOptionsBox";
    352       this.groupingOptionsBox.Size = new System.Drawing.Size(180, 44);
     366      this.groupingOptionsBox.Size = new System.Drawing.Size(180, 50);
    353367      this.groupingOptionsBox.TabIndex = 8;
    354368      this.groupingOptionsBox.TabStop = false;
     
    416430    private System.Windows.Forms.NumericUpDown widthNumericUpDown;
    417431    private System.Windows.Forms.NumericUpDown heightNumericUpDown;
     432    private System.Windows.Forms.CheckBox lockAspectCheckBox;
    418433  }
    419434}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs

    r14902 r14917  
    4343    public ScatterPlotMultiView() {
    4444      InitializeComponent();
     45
     46      oldWidth = (int)widthNumericUpDown.Value;
     47      oldHeight = (int)heightNumericUpDown.Value;
    4548
    4649      regressionTypeComboBox.DataSource = Enum.GetValues(typeof(RegressionType));
     
    465468
    466469    #region Sizing of Charts
     470    private int oldWidth;
     471    private int oldHeight;
     472    private float AspectRatio {
     473      get {
     474        if (oldWidth == 0 || oldHeight == 0) return 1;
     475        return (float)oldWidth / oldHeight;
     476      }
     477    }
     478    private bool lockChange = false;
    467479
    468480    private int GetColumnWidth() { return (int)widthNumericUpDown.Value; }
    469481    private int GetRowHeight() { return (int)heightNumericUpDown.Value; }
     482
    470483    private void widthNumericUpDown_ValueChanged(object sender, EventArgs e) {
    471484      frameTableLayoutPanel.SuspendRepaint();
     485      if (lockAspectCheckBox.Checked && !lockChange) {
     486        lockChange = true;
     487        heightNumericUpDown.Value = (int)((double)widthNumericUpDown.Value / AspectRatio);
     488        lockChange = false;
     489      }
    472490      for (int i = 0; i < columnHeaderTableLayoutPanel.ColumnCount; i++) {
    473491        columnHeaderTableLayoutPanel.ColumnStyles[i].Width = GetColumnWidth();
    474492        bodyTableLayoutPanel.ColumnStyles[i].Width = GetColumnWidth();
    475493      }
     494      oldWidth = GetColumnWidth();
     495      oldHeight = GetRowHeight();
    476496      frameTableLayoutPanel.ResumeRepaint(true);
    477497    }
    478498    private void heightNumericUpDown_ValueChanged(object sender, EventArgs e) {
    479499      frameTableLayoutPanel.SuspendRepaint();
     500      if (lockAspectCheckBox.Checked && !lockChange) {
     501        lockChange = true;
     502        widthNumericUpDown.Value = (int)((double)heightNumericUpDown.Value * AspectRatio);
     503        lockChange = false;
     504      }
    480505      for (int i = 0; i < rowHeaderTableLayoutPanel.RowCount; i++) {
    481506        rowHeaderTableLayoutPanel.RowStyles[i].Height = GetRowHeight();
    482507        bodyTableLayoutPanel.RowStyles[i].Height = GetRowHeight();
    483508      }
     509      oldWidth = GetColumnWidth();
     510      oldHeight = GetRowHeight();
    484511      frameTableLayoutPanel.ResumeRepaint(true);
    485512    }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs

    r14725 r14917  
    183183    private void UpdateRegressionLine() {
    184184      if (Content == null) return;
    185       scatterPlotControl.Content.Rows.Clear();
    186185
    187186      var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
    188187      int order = (int)polynomialRegressionOrderNumericUpDown.Value;
    189188
    190       var rows = scatterPlotControl.Content.Rows.ToList();
    191       foreach (var row in rows) {
     189      foreach (var row in scatterPlotControl.Content.Rows) {
    192190        row.VisualProperties.IsRegressionVisibleInLegend = false;
    193191        row.VisualProperties.RegressionType = regressionType;
    194192        row.VisualProperties.PolynomialRegressionOrder = order;
    195193      }
    196       scatterPlotControl.Content.Rows.AddRange(rows);
    197194    }
    198195    #endregion
Note: See TracChangeset for help on using the changeset viewer.