private void kryptonDataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (kryptonDataGridView1.Columns[e.ColumnIndex].HeaderText.Equals("Status")) { SubSonic.CPF.Utility.LogState _state = (SubSonic.CPF.Utility.LogState)e.Value; DataGridViewCell cell = kryptonDataGridView1[e.ColumnIndex, e.RowIndex]; switch (_state) { case SubSonic.CPF.Utility.LogState.Warning: e.CellStyle.BackColor = Color.Orange; break; case SubSonic.CPF.Utility.LogState.Error: e.CellStyle.BackColor = Color.Red; break; case SubSonic.CPF.Utility.LogState.Information: e.CellStyle.BackColor = Color.LightSteelBlue; break; } } }
void AddInfoItem(SubSonic.CPF.Utility.LogState State, string Title, string Description) { SubSonic.CPF.Utility.LogManager.Entries.Add(new SubSonic.CPF.Utility.LogEntry(State, Title, Description)); }