private void UpdateRtcStatus(object sender, RtcDisplayEventArgs e) { // Is this method on the UI thread? If not then we need to marshal it to the UI thread. if (this.InvokeRequired) { RunToCompletion.RtcDisplayHandler rtcDisplayHandler = new RunToCompletion.RtcDisplayHandler(UpdateRtcStatus); Invoke(rtcDisplayHandler, new object[] { sender, e }); } else { this.textBoxHistory.Text += "\r\n" + e.Message; this.textBoxState.Text = e.Message; } }
private void UpdateRtcStatus(object sender, RtcDisplayEventArgs e) { // Is this method on the UI thread? If not then we need to marshal it to the UI thread. if (this.InvokeRequired) { RunToCompletion.RtcDisplayHandler rtcDisplayHandler = new RunToCompletion.RtcDisplayHandler(UpdateRtcStatus); Invoke(rtcDisplayHandler, new object[] {sender, e}); } else { this.textBoxHistory.Text += "\r\n" + e.Message; this.textBoxState.Text = e.Message; } }