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; } }
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 ); }