Ignore:
Timestamp:
01/05/17 15:50:40 (5 years ago)
Author:
pfleck
Message:

#2709 Added shortcuts for select input/all/none variables in datagrid and statistics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs

    r14545 r14546  
    198198    private void Content_Changed(object sender, DataPreprocessingChangedEventArgs e) {
    199199      UpdateData();
    200       //switch (e.Type) {
    201       //  case DataPreprocessingChangedEventType.DeleteColumn:
    202       //    statisticsMatrix.RemoveAt(e.Column);
    203       //    break;
    204       //  case DataPreprocessingChangedEventType.AddColumn:
    205       //    statisticsMatrix.Insert(e.Row, GetList(e.Column));
    206       //    stringMatrixView.Content.Rows++;
    207       //    break;
    208       //  case DataPreprocessingChangedEventType.ChangeItem:
    209       //    statisticsMatrix[e.Column] = GetList(e.Column);
    210       //    break;
    211       //  case DataPreprocessingChangedEventType.DeleteRow:
    212       //  case DataPreprocessingChangedEventType.AddRow:
    213       //  default:
    214       //    for (int i = 0; i < statisticsMatrix.Count; ++i) {
    215       //      statisticsMatrix[i] = GetList(e.Column);
    216       //    }
    217       //    break;
    218       //}
     200    }
     201
     202    private void checkInputsTargetButton_Click(object sender, EventArgs e) {
     203      foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) {
     204        var variable = column.HeaderText;
     205        bool isInputTarget = Content.PreprocessingData.InputVariables.Contains(variable)
     206                             || Content.PreprocessingData.TargetVariable == variable;
     207        column.Visible = isInputTarget;
     208      }
     209    }
     210
     211    private void checkAllButton_Click(object sender, EventArgs e) {
     212      foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) {
     213        column.Visible = true;
     214      }
     215    }
     216
     217    private void uncheckAllButton_Click(object sender, EventArgs e) {
     218      foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) {
     219        column.Visible = false;
     220      }
    219221    }
    220222  }
Note: See TracChangeset for help on using the changeset viewer.