コード例 #1
0
ファイル: main.cs プロジェクト: GEngine-JP/FuckQQ
 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();
     }
 }
コード例 #2
0
        private void ShowMsg()
        {
            bool   isHaveWin  = false;
            int    MsgId      = 0;
            int    hand       = 0;
            string msg        = "";
            string FriendName = UserInf.GetUserNameByUserNumber(parameter[1].Trim());

            if (FriendName.Trim() == "")
            {
                msg += parameter[1].Trim();
            }
            else
            {
                msg += FriendName;
            }
            msg += ":(" + UserInf.GetTime() + ")\n    " + parameter[2].Trim();
            for (int i = 0; i < ShareDate.WinName.Count; i++)
            {
                if (parameter[1].Trim() == ShareDate.WinName[i].ToString().Trim())
                {
                    hand      = int.Parse(ShareDate.WinHand[i].ToString());
                    isHaveWin = true;
                    break;
                }
            }
            MsgId = ShareDate.Msg.Add(msg);
            if (isHaveWin)
            {
                TrafficMsg.PostMessage(hand, 500, MsgId, 0);             //向目标窗口发送消息
            }
            else
            {
                TrafficMsg.PostMessage(ShareDate.MainFormHand, 501, int.Parse(parameter[1]), MsgId);             //闪烁图标
            }
        }