Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/21/14 11:12:31 (10 years ago)
Author:
mleitner
Message:

Add colors to histogram / remove all in one mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs

    r10818 r10867  
    1818    }
    1919
     20    protected override void OnContentChanged()
     21    {
     22      base.OnContentChanged();
     23      if (Content != null)
     24      {
     25        logic = Content.ChartLogic;
     26        Content.AllInOneMode = false;
     27
     28        classifierComboBox.Items.Clear();
     29
     30        classifierComboBox.Items.Add("None");
     31
     32        foreach(string var in logic.GetVariableNames()){
     33          classifierComboBox.Items.Add(var);
     34        }
     35
     36        if (classifierComboBox.SelectedIndex == -1) {
     37          classifierComboBox.SelectedIndex = 0;
     38        }
     39      }
     40    }
     41
    2042    public new HistogramContent Content {
    2143      get { return (HistogramContent)base.Content; }
     
    2345    }
    2446
    25     private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) {
    26       if (allInOneCheckBox.Checked)
    27         Content.AllInOneMode = true;
    28       else
    29         Content.AllInOneMode = false;
     47    private void classifierComboBox_SelectedIndexChanged(object sender, EventArgs e)
     48    {
     49      if (classifierComboBox.SelectedItem == null)
     50        return;
     51
     52
     53      if (classifierComboBox.SelectedIndex != 0)
     54      {
     55        classification = logic.GetVariableValues(classifierComboBox.SelectedItem.ToString());
     56      }
     57      else {
     58        classification = null;
     59      }
     60
    3061      GenerateChart();
    3162    }
    32 
    33     protected override void OnContentChanged()
    34     {
    35       base.OnContentChanged();
    36       if (Content != null)
    37       {
    38         allInOneCheckBox.Checked = Content.AllInOneMode;
    39       }
    40     }
    41 
    4263  }
    4364}
Note: See TracChangeset for help on using the changeset viewer.