private void listView1_DoubleClick(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { MsgContent msgcontent = null; foreach (MsgContent msg in UDPListener.instance.UnDealMsg) { if (listView1.SelectedItems.ContainsKey(msg.MsgId)) { msgcontent = msg; break; } } if (msgcontent != null) { MsgContentForm frm = new MsgContentForm(msgcontent); frm.ShowDialog(); } } loadUnDealMsg(); }
void MsgShow(MsgContent msg) { MsgContentForm frm = new MsgContentForm(msg); frm.Show(); }