Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/23/17 16:11:02 (7 years ago)
Author:
abeham
Message:

#2457: updated branch to trunk

Location:
branches/PerformanceComparison/HeuristicLab.Analysis.Views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views

  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs

    r12012 r14600  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Drawing;
    2424using System.Windows.Forms;
     25using HeuristicLab.Common.Resources;
    2526using HeuristicLab.MainForm;
    2627using HeuristicLab.MainForm.WindowsForms;
     
    4546      chartTypeComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowChartType));
    4647      lineStyleComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowLineStyle));
     48      aggregationComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowHistogramAggregation));
     49      clearColorButton.BackColor = Color.Transparent;
     50      clearColorButton.BackgroundImage = VSImageLibrary.Delete;
    4751      SetEnabledStateOfControls();
    4852    }
     
    6569          binsApproximatelyRadioButton.Checked = false;
    6670          binsExactRadioButton.Checked = false;
     71          aggregationComboBox.SelectedIndex = -1;
    6772          displayNameTextBox.Text = String.Empty;
    6873        } else {
     
    9398          binsApproximatelyRadioButton.Checked = !Content.ExactBins;
    9499          binsExactRadioButton.Checked = Content.ExactBins;
     100          aggregationComboBox.SelectedItem = Content.Aggregation;
    95101          displayNameTextBox.Text = Content.DisplayName;
     102          isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend;
    96103        }
    97104      } finally { SuppressEvents = false; }
     
    101108    protected virtual void SetEnabledStateOfControls() {
    102109      commonGroupBox.Enabled = Content != null;
     110      clearColorButton.Visible = Content != null && !Content.Color.IsEmpty;
    103111      lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line;
    104112      histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram;
     113      isVisibleInLegendCheckBox.Enabled = Content != null;
    105114    }
    106115
     
    126135        colorButton.BackColor = Content.Color;
    127136        colorButton.Text = String.Empty;
     137        clearColorButton.Visible = true;
     138      }
     139    }
     140
     141    private void clearColorButton_Click(object sender, EventArgs e) {
     142      if (!SuppressEvents && Content != null) {
     143        SuppressEvents = true;
     144        try {
     145          Content.Color = Color.Empty;
     146          colorButton.BackColor = SystemColors.Control;
     147          colorButton.Text = "?";
     148          clearColorButton.Visible = false;
     149        } finally { SuppressEvents = false; }
    128150      }
    129151    }
     
    180202    }
    181203
     204    private void aggregationComboBox_SelectedValueChanged(object sender, EventArgs e) {
     205      if (!SuppressEvents && Content != null) {
     206        SuppressEvents = true;
     207        try {
     208          Content.Aggregation = (DataRowVisualProperties.DataRowHistogramAggregation)aggregationComboBox.SelectedValue;
     209        } finally { SuppressEvents = false; }
     210      }
     211    }
     212
    182213    private void displayNameTextBox_Validated(object sender, EventArgs e) {
    183214      if (!SuppressEvents && Content != null) {
     
    186217          Content.DisplayName = displayNameTextBox.Text;
    187218        } finally { SuppressEvents = false; }
     219      }
     220    }
     221
     222    private void isVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) {
     223      if (!SuppressEvents && Content != null) {
     224        Content.IsVisibleInLegend = isVisibleInLegendCheckBox.Checked;
    188225      }
    189226    }
Note: See TracChangeset for help on using the changeset viewer.