Example #1
0
 public static void StartChat()
 {
     if (chatForm == null)
     {
         new Thread(() =>
         {
             chatForm = new RemoteChatForm(NetworkHost);
             chatForm.ShowDialog();
         }).Start();
     }
 }
Example #2
0
 public static void Disconnect()
 {
     if (chatForm != null)
     {
         chatForm.Invoke((MethodInvoker)delegate ()
         {
             chatForm.Close();
             chatForm.Dispose();
             chatForm = null;
         });
     }
 }