private void 发送此封包ToolStripMenuItem_Click(object sender, EventArgs e) { foreach (ListViewItem li in this.listView1.SelectedItems) { if (li.SubItems[0].Text == "send") //只有send封包才可以被发送 { string s = li.SubItems[9].Text; SendPacket.SendPacketManually(s); } } }
//点击发送封包 private void button1_Click(object sender, EventArgs e) { string s = textBox1.Text; SendPacket.SendPacketManually(s); }