private void lvProteins_ItemChecked(object sender, ItemCheckedEventArgs e) { if (this.bUpdatingProtein) { return; } if (e.Item == null) { return; } var group = e.Item.Tag as IIdentifiedProteinGroup; foreach (IIdentifiedProtein protein in group) { option.SetProteinRatioValid(protein, e.Item.Checked); } lvProteins.BeginUpdate(); try { UpdateProteinEntry(e.Item, group, e.Item.ImageIndex); //UpdateProteinColor(group[0], e.Item); DoUpdateResult(); DoUpdateProtein(); } finally { lvProteins.EndUpdate(); } this.btnSave.Enabled = true; }