private void removeFromListToolStripMenuItem_Click(object sender, EventArgs e) { for (int i = listView1.Items.Count - 1; i >= 0; i--) { if (listView1.Items[i].Selected) { Global.ClientRemove(listView1.Items[i].Text); listView1.Items[i].Remove(); } } }
private void exitToolStripMenuItem_Click(object sender, EventArgs e) { for (int i = listView1.Items.Count - 1; i >= 0; i--) { if (listView1.Items[i].Selected) { Global.AddCommandToList(listView1.Items[i].Text, "close"); Global.ClientRemove(listView1.Items[i].Text); listView1.Items[i].Remove(); } } }