Example #1
0
 /// <summary>
 /// 核心发送方法
 /// </summary>
 /// <param name="msg"></param>
 /// <param name="imgs"></param>
 public void mainThreadSendWithUser(string userName, Image userHeader, string msg, Image[] imgs, string longImgPath)
 {
     Clipboard.Clear();
     if (userHeader != null)
     {
         Clipboard.SetImage(userHeader);
         SenderApi.QQPaste(mHwnd);
     }
     if (!string.IsNullOrEmpty(userName))
     {
         Clipboard.SetText(userName);
         SenderApi.QQPasteln(mHwnd);
         Clipboard.Clear();
     }
     Clipboard.SetText(msg);
     SenderApi.QQPasteln(mHwnd);
     foreach (Image img in imgs)
     {
         if (img != null)
         {
             Clipboard.SetImage(img);
             Thread.Sleep(2000);
             SenderApi.QQPasteln(mHwnd);
         }
     }
     Thread.Sleep(1000);
     SenderApi.QQSumbit(mHwnd);
 }
Example #2
0
 /// <summary>
 /// 核心发送方法
 /// </summary>
 /// <param name="msg"></param>
 /// <param name="imgs"></param>
 public void mainThreadSend(string msg, Image[] imgs)
 {
     Clipboard.Clear();
     Clipboard.SetText(msg);
     SenderApi.QQPasteln(mHwnd);
     if (imgs != null)
     {
         foreach (Image img in imgs)
         {
             if (img != null)
             {
                 Clipboard.SetImage(img);
                 Thread.Sleep(1000);
                 SenderApi.QQPaste(mHwnd);
             }
         }
     }
     SenderApi.QQSumbit(mHwnd);
 }