- Timestamp:
- 11/10/11 13:04:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
r6740 r6982 106 106 values[i, 0] = row.ToString(); 107 107 values[i, 1] = target[i].ToString(); 108 //display only indices and target values if no models are present 109 if (i >= estimatedClassValues.Length) continue; 110 108 111 values[i, 2] = estimatedClassValues[i].ToString(); 109 112 values[i, 3] = (target[i] == estimatedClassValues[i]).ToString(); … … 131 134 matrix.SortableView = true; 132 135 matrixView.Content = matrix; 133 UpdateColoringOfRows();134 136 } 135 137 … … 162 164 return; 163 165 } 164 bool correctClassified = bool.Parse(matrixView.DataGridView[3, e.RowIndex].Value.ToString()); 166 var cellValue = matrixView.DataGridView[3, e.RowIndex].Value.ToString(); 167 if (string.IsNullOrEmpty(cellValue)) return; 168 bool correctClassified = bool.Parse(cellValue); 165 169 matrixView.DataGridView.Rows[e.RowIndex].DefaultCellStyle.ForeColor = correctClassified ? Color.MediumSeaGreen : Color.Red; 166 }167 168 private void UpdateColoringOfRows() {169 if (InvokeRequired) {170 Invoke((Action)UpdateColoringOfRows);171 return;172 }173 //matrixView.DataGridView.SuspendRepaint();174 //for (int i = 0; i < matrixView.DataGridView.Rows.Count; i++) {175 // bool correctClassified = bool.Parse(matrixView.Content.GetValue(i, 3));176 // matrixView.DataGridView.Rows[i].DefaultCellStyle.ForeColor = correctClassified ? Color.MediumSeaGreen : Color.Red;177 //}178 //matrixView.DataGridView.ResumeRepaint(true);179 170 } 180 171 }
Note: See TracChangeset
for help on using the changeset viewer.