private void PopulateFormWithMarkCollection(MarkCollection collection, bool forceUpdate = false)
{
if (_displayedCollection == collection && !forceUpdate)
return;
_displayedCollection = collection;
if (collection == null) {
textBoxCollectionName.Text = "";
numericUpDownWeight.Value = 1;
panelColor.BackColor = SystemColors.Control;
checkBoxEnabled.Checked = false;
} else {
textBoxCollectionName.Text = collection.Name;
numericUpDownWeight.Value = collection.Level;
panelColor.BackColor = collection.MarkColor;
checkBoxEnabled.Checked = collection.Enabled;
}
PopulateMarkListFromMarkCollection(collection);
groupBoxSelectedMarkCollection.Enabled = (collection != null);
}