void alertClient_TalkReceived(AlertClient sender, TalkMsg talkMsg) { Action action = () => { txtMsg.AppendText(string.Format("{0} {1} Talk: {2}\r\n", DateTime.Now.ToString("MM-dd HH:mm"), sender.Name, talkMsg.MsgContent)); }; this.BeginInvoke(action); }
private void OnTalkReceived(TalkMsg talkMsg) { if (this.TalkReceived != null) this.TalkReceived(this, talkMsg); }