Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/30/17 16:41:06 (7 years ago)
Author:
pfleck
Message:

#2713 #2715 #2765
Merged to stable

  • 14435-14439,14493,14516,14519,14982,14987,14992,15042 (from #2713)
  • 14457-14458,14508,14582,14740,14984,15068,15095 (from #2715)
  • 14860-14861 (from #2765)
Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Analysis.Views

  • stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.cs

    r14186 r15097  
    2020#endregion
    2121
     22using System;
     23using System.Drawing;
     24using System.Windows.Forms;
    2225using HeuristicLab.MainForm;
    2326using HeuristicLab.MainForm.WindowsForms;
    24 using System.Drawing;
    25 using System.Windows.Forms;
    2627
    2728namespace HeuristicLab.Analysis.Views {
     
    5859      errorProvider.SetIconPadding(yAxisSecondaryMinimumFixedTextBox, 2);
    5960      errorProvider.SetIconPadding(yAxisSecondaryMaximumFixedTextBox, 2);
     61      histogramAggregationComboBox.DataSource = Enum.GetValues(typeof(DataTableVisualProperties.DataTableHistogramAggregation));
    6062    }
    6163
     
    101103          yAxisSecondaryMaximumFixedTextBox.Text = string.Empty;
    102104          yAxisSecondaryLogScaleCheckBox.Checked = false;
     105
     106          histogramBinsNumericUpDown.Value = 1;
     107          histogramBinsApproximatelyRadioButton.Checked = false;
     108          histogramBinsExactRadioButton.Checked = false;
     109          histogramAggregationComboBox.SelectedIndex = -1;
    103110        } else {
    104111          titleFontLabel.Text = "( " + FormatFont(Content.TitleFont) + " )";
     
    139146          yAxisSecondaryMaximumFixedTextBox.Text = Content.SecondYAxisMaximumFixedValue.ToString();
    140147          yAxisSecondaryLogScaleCheckBox.Checked = Content.SecondYAxisLogScale;
     148
     149          if (Content.HistogramBins < histogramBinsNumericUpDown.Minimum)
     150            histogramBinsNumericUpDown.Value = histogramBinsNumericUpDown.Minimum;
     151          else if (Content.HistogramBins > histogramBinsNumericUpDown.Maximum)
     152            histogramBinsNumericUpDown.Value = histogramBinsNumericUpDown.Maximum;
     153          else histogramBinsNumericUpDown.Value = Content.HistogramBins;
     154          histogramBinsApproximatelyRadioButton.Checked = !Content.HistogramExactBins;
     155          histogramBinsExactRadioButton.Checked = Content.HistogramExactBins;
     156          histogramAggregationComboBox.SelectedItem = Content.HistogramAggregation;
    141157        }
    142158      } finally { SuppressEvents = false; }
     
    483499      }
    484500    }
     501
     502    private void histogramBinsNumericUpDown_ValueChanged(object sender, System.EventArgs e) {
     503      if (!SuppressEvents && Content != null) {
     504        Content.HistogramBins = (int)histogramBinsNumericUpDown.Value;
     505      }
     506    }
     507
     508    private void histogramBinsExactRadioButton_CheckedChanged(object sender, System.EventArgs e) {
     509      if (!SuppressEvents && Content != null) {
     510        SuppressEvents = true;
     511        try {
     512          Content.HistogramExactBins = histogramBinsExactRadioButton.Checked;
     513        } finally { SuppressEvents = false; }
     514      }
     515    }
     516
     517    private void histogramAggregationComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
     518      if (!SuppressEvents && Content != null) {
     519        SuppressEvents = true;
     520        try {
     521          Content.HistogramAggregation = (DataTableVisualProperties.DataTableHistogramAggregation)histogramAggregationComboBox.SelectedValue;
     522        } finally { SuppressEvents = false; }
     523      }
     524    }
    485525    #endregion
    486526
Note: See TracChangeset for help on using the changeset viewer.