예제 #1
0
 /// <summary>
 /// Append Message to the Chatbox
 /// </summary>
 /// <param name="Message"></param>
 private void LogWrite(String Message, params object[] format)
 {
     //return;
     Message = String.Format(Message, format);
     if (!IsDisposed)
     {
         if (Chatbox.InvokeRequired)
         {
             Chatbox.Invoke(new Action(() =>
             {
                 if (ChatboxAutoscroll)
                 {
                     Chatbox.AppendText(Message);
                 }
                 else
                 {
                     BufferedChatlog += Message;
                 }
             }));
         }
         else
         {
             Chatbox.AppendText(Message);
         }
     }
 }
예제 #2
0
 /// <summary>
 /// clears the chatbox.
 /// </summary>
 private void ClearChatlog()
 {
     if (Chatbox.IsDisposed)
     {
         return;
     }
     if (Chatbox.InvokeRequired)
     {
         Chatbox.Invoke(new Action(() => { Chatbox.Clear(); }));
     }
     else
     {
         Chatbox.Clear();
     }
 }