Changeset 10534 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs
- Timestamp:
- 03/05/14 13:28:31 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs
r10374 r10534 53 53 } 54 54 55 columns[0].HeaderCell.Value = "Type"; 56 columns[1].HeaderCell.Value = "Missing Values"; 57 columns[2].HeaderCell.Value = "Min"; 58 columns[3].HeaderCell.Value = "Max"; 59 columns[4].HeaderCell.Value = "Median"; 60 columns[5].HeaderCell.Value = "Average"; 61 columns[6].HeaderCell.Value = "std. Deviation"; 62 columns[7].HeaderCell.Value = "Variance"; 63 columns[8].HeaderCell.Value = "Most Common Value"; 64 columns[9].HeaderCell.Value = "Num. diff. Values"; 65 55 66 for (int i = 0; i < logic.GetColumnCount(); ++i) { 56 67 List<string> list; … … 72 83 dataGridView.Columns.Clear(); 73 84 dataGridView.Columns.AddRange(columns); 74 dataGridView.RowCount = columnsRowsMatrix [0].Count;85 dataGridView.RowCount = columnsRowsMatrix.Count; 75 86 87 for (int i = 0; i < columnsRowsMatrix.Count; ++i) { 88 dataGridView.Rows[i].HeaderCell.Value = logic.GetVariableName(i); 89 } 90 dataGridView.AllowUserToResizeColumns = true; 76 91 } 77 92 … … 115 130 logic.GetMin<DateTime>(columnIndex).ToString(), 116 131 logic.GetMax<DateTime>(columnIndex).ToString(), 117 "", //median118 "", //average119 "", //standard deviation120 "", //variance121 logic.GetMostCommonValue< string>(columnIndex).ToString(),122 logic.GetDifferentValuesCount< string>(columnIndex).ToString()132 logic.GetMedianDateTime(columnIndex).ToString(), 133 logic.GetAverageDateTime(columnIndex).ToString(), 134 logic.GetStandardDeviation(columnIndex).ToString(), 135 logic.GetVariance(columnIndex).ToString(), //variance 136 logic.GetMostCommonValue<DateTime>(columnIndex).ToString(), 137 logic.GetDifferentValuesCount<DateTime>(columnIndex).ToString() 123 138 }; 124 139 } … … 129 144 130 145 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 131 if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < Content.StatisticsLogic.GetColumnCount()) {132 dataGridView[e.ColumnIndex, e.RowIndex].Value = columnsRowsMatrix[e.ColumnIndex][e.RowIndex];146 if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < columnsRowsMatrix[0].Count) { 147 e.Value = columnsRowsMatrix[e.RowIndex][e.ColumnIndex]; 133 148 } 134 149 }
Note: See TracChangeset
for help on using the changeset viewer.