Ignore:
Timestamp:
06/30/17 16:41:06 (2 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/DataRowVisualPropertiesControl.cs

    r14186 r15097  
    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      clearColorButton.BackColor = Color.Transparent;
     49      clearColorButton.BackgroundImage = VSImageLibrary.Delete;
    4750      SetEnabledStateOfControls();
    4851    }
     
    6265          startIndexZeroCheckBox.Checked = false;
    6366          lineWidthNumericUpDown.Value = 1;
    64           binsNumericUpDown.Value = 1;
    65           binsApproximatelyRadioButton.Checked = false;
    66           binsExactRadioButton.Checked = false;
    6767          displayNameTextBox.Text = String.Empty;
    6868        } else {
     
    8686            lineWidthNumericUpDown.Value = lineWidthNumericUpDown.Maximum;
    8787          else lineWidthNumericUpDown.Value = Content.LineWidth;
    88           if (Content.Bins < binsNumericUpDown.Minimum)
    89             binsNumericUpDown.Value = binsNumericUpDown.Minimum;
    90           else if (Content.Bins > binsNumericUpDown.Maximum)
    91             binsNumericUpDown.Value = binsNumericUpDown.Maximum;
    92           else binsNumericUpDown.Value = Content.Bins;
    93           binsApproximatelyRadioButton.Checked = !Content.ExactBins;
    94           binsExactRadioButton.Checked = Content.ExactBins;
    9588          displayNameTextBox.Text = Content.DisplayName;
     89          isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend;
    9690        }
    9791      } finally { SuppressEvents = false; }
     
    10195    protected virtual void SetEnabledStateOfControls() {
    10296      commonGroupBox.Enabled = Content != null;
     97      clearColorButton.Visible = Content != null && !Content.Color.IsEmpty;
    10398      lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line;
    104       histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram;
     99      isVisibleInLegendCheckBox.Enabled = Content != null;
    105100    }
    106101
     
    126121        colorButton.BackColor = Content.Color;
    127122        colorButton.Text = String.Empty;
     123        clearColorButton.Visible = true;
     124      }
     125    }
     126
     127    private void clearColorButton_Click(object sender, EventArgs e) {
     128      if (!SuppressEvents && Content != null) {
     129        SuppressEvents = true;
     130        try {
     131          Content.Color = Color.Empty;
     132          colorButton.BackColor = SystemColors.Control;
     133          colorButton.Text = "?";
     134          clearColorButton.Visible = false;
     135        } finally { SuppressEvents = false; }
    128136      }
    129137    }
     
    165173    }
    166174
    167     private void binsNumericUpDown_ValueChanged(object sender, EventArgs e) {
    168       if (!SuppressEvents && Content != null) {
    169         Content.Bins = (int)binsNumericUpDown.Value;
    170       }
    171     }
    172 
    173     private void binNumberRadioButton_CheckedChanged(object sender, EventArgs e) {
    174       if (!SuppressEvents && Content != null) {
    175         SuppressEvents = true;
    176         try {
    177           Content.ExactBins = binsExactRadioButton.Checked;
    178         } finally { SuppressEvents = false; }
    179       }
    180     }
    181 
    182175    private void displayNameTextBox_Validated(object sender, EventArgs e) {
    183176      if (!SuppressEvents && Content != null) {
     
    188181      }
    189182    }
     183
     184    private void isVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) {
     185      if (!SuppressEvents && Content != null) {
     186        Content.IsVisibleInLegend = isVisibleInLegendCheckBox.Checked;
     187      }
     188    }
    190189    #endregion
    191190  }
Note: See TracChangeset for help on using the changeset viewer.