예제 #1
0
        private void LattePandaCommunication_onLatteDataReceived(object sender, LatteDataReceivedEventArgs e)
        {
            dynamic syncData = null;
            string  mess     = e.Message;

            if (string.IsNullOrWhiteSpace(mess) || mess == "\n")
            {
                return;
            }
            Debug.WriteLine(mess);
            if (mess.Contains("SendAgain"))
            {
                GlobalFlowControl.SendToBaseAgain();
                return;
            }
            try
            {
                syncData = JsonConvert.DeserializeObject <SynchronisationData>(mess);
            }
            catch
            {
                Debug.WriteLine("Error! Requesting to receive again");
                GlobalFlowControl.SendToBase("SendAgain");
                return;
            }
        }
예제 #2
0
 private void LattePandaCommunication_onLatteDataReceived(object sender, LatteDataReceivedEventArgs e)
 {
     MessageBox.Show(e.Message);
     //if (!string.IsNullOrWhiteSpace(e.Message) && e.Message != "\n")
     //Debug.WriteLine(++count + ": " + e.Message );
 }