//删除 private void btnOK_Click(object sender, EventArgs e) { try { if (listView1.SelectedItems.Count == 0) { ShowToast("提示", "没有选中任何文件", 2); return; } foreach (ListViewItem item in listView1.SelectedItems) { if (!homeRep.DeleteInfo(item.Text)) { ShowToast("提示", "删除" + item.Text + "失败", 1); } } ReFlush(); ShowToast("提示", "删除成功", 1); } catch (IOException copyError) { ShowToast("提示", copyError.Message, 2); return; } }