Esempio n. 1
0
 private void IncomingMessage(Message msg)
 {
     if (msg.get_Type() != 0)
     {
         if (msg.get_Subject() != null)
         {
             this.txtSubject.Text = msg.get_Subject();
             this.rtfChat.SelectionColor = Color.DarkGreen;
             this.rtfChat.AppendText(msg.get_From().get_Resource() + " changed subject: ");
             this.rtfChat.SelectionColor = Color.Black;
             this.rtfChat.AppendText(msg.get_Subject());
             this.rtfChat.AppendText("\r\n");
         }
         else if (msg.get_Body() != null)
         {
             this.rtfChat.SelectionColor = Color.Red;
             this.rtfChat.AppendText(msg.get_From().get_Resource() + " said: ");
             this.rtfChat.SelectionColor = Color.Black;
             this.rtfChat.AppendText(msg.get_Body());
             this.rtfChat.AppendText("\r\n");
         }
     }
 }