예제 #1
0
파일: MessageForm.cs 프로젝트: rLoka/RAT
 private void AppendReceivedTextMessage(string receivedMessageText)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.rtbMessages.InvokeRequired)
     {
         AppendReceivedTextMessageCallback d = new AppendReceivedTextMessageCallback(AppendReceivedTextMessage);
         this.Invoke(d, new object[] { receivedMessageText });
     }
     else
     {
         var date = DateTime.Now;
         this.rtbMessages.AppendText(date.Hour + ":" + date.Minute + " " + receivedMessageText + "\r\n");
     }
 }
예제 #2
0
파일: MessageForm.cs 프로젝트: PHPPlay/RAT
 private void AppendReceivedTextMessage(string receivedMessageText)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.rtbMessages.InvokeRequired)
     {
         AppendReceivedTextMessageCallback d = new AppendReceivedTextMessageCallback(AppendReceivedTextMessage);
         this.Invoke(d, new object[] { receivedMessageText });
     }
     else
     {
         var date = DateTime.Now;
         this.rtbMessages.AppendText(date.Hour+ ":" + date.Minute + " - Server: " + receivedMessageText + "\r\n");
     }
 }