Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 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();
     }
 }