//处理接受到对方说的话的消息 public void handleSendMessage(string content) { string talk = content; AddMessageEventArgs org = new AddMessageEventArgs(); org.Talk = talk; OnAddMessage(this, org); }
//添加对方发来的信息 public void AddMessage(object sender, ChessClass.AddMessageEventArgs e) { if (this.InvokeRequired) { this.Invoke( new EventHandler <ClientGobang.ChessClass.AddMessageEventArgs>(AddMessage), new object[] { sender, e }); } else { } }