public static void InFunction(String message) { MessageArgs messageArgs = new MessageArgs { TextMessage = message }; if (PartEvent != null) { PartEvent(null, messageArgs); } }
private void MyMonitor_PartEvent(object sender, MessageArgs e) { this.Dispatcher.Invoke(new Action(() => { textBox.Text = e.TextMessage; })); }