private void UpdateMarkCollectionInList(MarkCollection collection)
{
foreach (ListViewItem item in listViewMarkCollections.Items) {
if (item.Tag as MarkCollection == collection) {
item.SubItems[0].Text = collection.Name;
item.SubItems[1].Text = collection.Level.ToString();
item.SubItems[2].Text = collection.Marks.Count.ToString();
item.BackColor = (collection.Enabled) ? collection.MarkColor : SystemColors.Window;
item.ForeColor = (collection.Enabled) ? ((GetGrayValueForColor(collection.MarkColor) > 128) ? Color.Black : Color.White) : SystemColors.InactiveCaptionText;
}
}
}