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