示例#1
1
        private void PrimarySerial_NewMessageReceived(object sender, Message message)
        {
            try
            {
                MessageLog += message.ToString() + "\r\n";
            }
            catch
            {

            }
        }
示例#2
0
 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);
     }));
 }
示例#3
0
        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
            {

            }
        }