private void AuthorsListBox_ItemCheck(object sender, ItemCheckEventArgs e) { for (var ix = 0; ix < AuthorsListBox.Items.Count; ++ix) { if (ix != e.Index) { AuthorsListBox.SetItemChecked(ix, false); } } RefreshAuthorInfoListBox(); }
private void AuthorsListBox_ItemCheck(object sender, ItemCheckEventArgs e) { if (e.NewValue == CheckState.Checked) { for (var index = 0; index < AuthorsListBox.Items.Count; ++index) { if (e.Index != index) { AuthorsListBox.SetItemChecked(index, false); } } } }