private void 게임삭제DToolStripMenuItem_Click(object sender, EventArgs e) { ListView.SelectedListViewItemCollection selectedItems = lvParty.SelectedItems; if ((selectedItems.Count > 0) && (MessageBox.Show($"{selectedItems.Count}개 항목을 삭제할까요?", "Swiss Tournament", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes)) { foreach (int num in from x in selectedItems.OfType <ListViewItem>() select x.SubItems[0].Text.ToInt32()) { MainForm.Instance.Manager.RemoveHistory(num); } Refresh(); } }