private void ProcessGPSMessage(GPSEventMessage e) { try { System.Windows.Application.Current.Dispatcher.Invoke(new Action(() => { GPSEvents.Add(new GPSEvent { Latitude = e.Latitude, Longitude = e.Longitude, MessageType = e.MessageType, Timestamp = e.Timestamp }); while (GPSEvents.Count() > 15000) { GPSEvents.RemoveAt(0); } })); } catch (System.Threading.ThreadInterruptedException intExc) { System.Diagnostics.Trace.Write(intExc.Message); } }
private void ExecuteClearGpsCommand() { GPSEvents.Clear(); GPSDataProvider.ClearBuffer(); }