コード例 #1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     _resultList.Clear();
     ListView.CheckedListViewItemCollection lvCheckedItems = this.lvToInfo.CheckedItems;
     _resultList  = lvCheckedItems.Cast <ListViewItem>().Select((lvItem) => lvItem.SubItems[1].Text.ToString()).ToList();
     DialogResult = DialogResult.OK;
 }
コード例 #2
0
 private static bool IsContains(ListView.CheckedListViewItemCollection checkedListViewItemCollection, string name)
 {
     return(checkedListViewItemCollection.Cast <ListViewItem>().Any(item => item.Text == name));
 }