Пример #1
0
        static void gps_LocationChanged(object sender, LocationChangedEventArgs args)
        {
            position = args.Position;

            // call the UpdateData method via the updateDataHandler so that we
            // update the UI on the UI thread
            if (updatePositionDataHandler != null)
            {
                updatePositionDataHandler.Invoke(sender, args);
            }
            //if (lastSave == null)
            //{
            //    GPSData point = new GPSData(position.Longitude, position.Latitude);
            //    //dataList.Add(point);
            //    lastSave = DateTime.Now;
            //}
            //if ((DateTime.Now.Millisecond - lastSave.Millisecond) > 10000)
            //{
            //    GPSData point = new GPSData(position.Longitude, position.Latitude);
            //    dataList.Add(point);
            //    lastSave = DateTime.Now;
            //}
            //System.Threading.Thread.Sleep(3000);
        }
Пример #2
0
        static void gps_LocationChanged(object sender, LocationChangedEventArgs args)
        {
            position = args.Position;

            // call the UpdateData method via the updateDataHandler so that we
            // update the UI on the UI thread
            if (updatePositionDataHandler != null)
            {
                updatePositionDataHandler.Invoke(sender, args);
            }
            //if (lastSave == null)
            //{
            //    GPSData point = new GPSData(position.Longitude, position.Latitude);
            //    //dataList.Add(point);
            //    lastSave = DateTime.Now;
            //}
            //if ((DateTime.Now.Millisecond - lastSave.Millisecond) > 10000)
            //{
            //    GPSData point = new GPSData(position.Longitude, position.Latitude);
            //    dataList.Add(point);
            //    lastSave = DateTime.Now;
            //}
            //System.Threading.Thread.Sleep(3000);
        }