void im_MessageReceived(object sender, IMReceivedEventArgs e) { this.BeginInvoke(new MethodInvoker(delegate { if (e.From == sendTo) { talkText.Text += String.Format("[{0}] {1}\r\n", e.From, e.Message); } })); }
protected virtual void OnMessageReceived(IMReceivedEventArgs e) { if (MessageReceived != null) MessageReceived(this, e); }