Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/14 17:27:27 (10 years ago)
Author:
aesterer
Message:

Revised line chart and added histogram

File:
1 edited

Legend:

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

    r10303 r10552  
    2929    protected override void OnContentChanged() {
    3030      base.OnContentChanged();
     31      if (Content != null) {
     32        InitDataTable();
     33        InitVariablesListBox();
     34      }
     35    }
     36
     37    private void InitVariablesListBox() {
     38      IHistogramLogic logic = Content.HistogramLogic;
     39
     40      foreach (var variableName in logic.GetVariableNames()) {
     41        variablesListBox.Items.Add(variableName, true);
     42      }
     43    }
     44
     45    private void InitDataTable() {
     46      IHistogramLogic logic = Content.HistogramLogic;
     47      viewHost.Content = logic.GetDataTable();
     48    }
     49
     50    private void variablesListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
     51      string item = variablesListBox.Items[e.Index] as string;
     52
     53      if (e.NewValue == CheckState.Checked && !Content.HistogramLogic.VariableIsDisplayed(item))
     54        Content.HistogramLogic.AddVariable(item);
     55      else if (e.NewValue == CheckState.Unchecked && Content.HistogramLogic.VariableIsDisplayed(item))
     56        Content.HistogramLogic.RemoveVariable(item);
    3157    }
    3258  }
Note: See TracChangeset for help on using the changeset viewer.