コード例 #1
0
ファイル: ServerForm.cs プロジェクト: InAFitOfRage/TCPChat
 protected void RecieveMessage(MyTCPChatUser user)
 {
     try
     {
         while (isActiv)
         {
             string message = server.GetMessage(user);
             this.Invoke(new MethodInvoker(() => { ChatBox.Text += message; }));
         }
     }
     catch (SystemException ex)
     {
         //MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
ファイル: ChatForm.cs プロジェクト: InAFitOfRage/TCPChat
 public ChatForm(string Name)
 {
     InitializeComponent();
     ChatUser = new MyTCPChatUser(Address, Port, Name);
 }