private void PrimarySerial_NewMessageReceived(object sender, Message message) { try { MessageLog += message.ToString() + "\r\n"; } catch { } }
public void InterpretMessage(string raw) { Message msg = new Message(raw); System.Diagnostics.Debug.WriteLine(msg.ToString()); Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { OnNewMessageReceivedEvent(this, msg); })); }
private void SendMessage() { try { Message msg = new Message(From, To, Type, Contents.Split(new string[] { "\\t" }, StringSplitOptions.None)); PrimarySerial.SendMessage(msg); MessageLog += msg.ToString() + "\r\n"; } catch { } }