private void notifyIcon1_DoubleClick(object sender, System.EventArgs e) { if (this.IconModel == 1) { this.Visible = true; } else { this.IconModel = 1; for (int i = 0; i < WinName.Count; i++) { string ShowName = UserInf.GetUserNameByUserNumber(this.WinName[i].ToString()) + "(" + this.WinName[i].ToString() + ")"; MsgSend temp = new MsgSend(ShowName, true); ShareDate.WinName.Add(this.WinName[i].ToString()); ShareDate.WinHand.Add(temp.Handle); temp.Show(); TrafficMsg.PostMessage(temp.Handle.ToInt32(), 500, int.Parse(this.MsgId[i].ToString()), 0); WinName.RemoveAt(i); MsgId.RemoveAt(i); } ResourceManager resources = new ResourceManager(typeof(main)); this.ShowIconModel(1); this.timer2.Stop(); } }
private void tFriend_DoubleClick(object sender, System.EventArgs e) { string ShowInf; bool online = false; bool IsHaveThisWin = false; int TempWinHand = 0; ShowInf = this.tFriend.SelectedNode.FullPath; if (ShowInf.IndexOf("\\", 0) != -1) { if (this.tFriend.SelectedNode.SelectedImageIndex == 0) { online = false; } else { online = true; } CheckOutNum check = new CheckOutNum(this.tFriend.SelectedNode.Text); for (int i = 0; i < ShareDate.WinName.Count; i++) { if (check.QQnumber.Trim() == ShareDate.WinName[i].ToString().Trim()) { TempWinHand = int.Parse(ShareDate.WinHand[i].ToString()); IsHaveThisWin = true; break; } } if (!IsHaveThisWin) { MsgSend msg = new MsgSend(this.tFriend.SelectedNode.Text, online); IntPtr hand = new IntPtr(); hand = msg.Handle; ShareDate.WinHand.Add(hand); ShareDate.WinName.Add(check.QQnumber); msg.Show(); } else { TrafficMsg.PostMessage(TempWinHand, 501, 0, 0); } } }