コード例 #1
0
 private async void BewaarPositie()
 {
     try
     {
         if (!_isStarted) return;
         if (null == CurrentTrk) return;
         Geoposition pos = await _locator.GetGeopositionAsync();
         TrkPt trkpt = new TrkPt(pos.Coordinate.Point);
         trkpt.TrackId = CurrentTrk.ID;
         IocContainer.TrkPtRepository.SaveTrkPt(trkpt);
         CurrentTrk.TrkPts.Add(trkpt);
     }
     catch(Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
     }
 }
コード例 #2
0
 public void SaveTrkPt(TrkPt trkPt)
 {
     string ins = $"insert into trkpt values(?,?,?,?,?)";
     object[] args = new object[] { null, trkPt.TrackId, trkPt.Latitude, trkPt.Longitude,trkPt.Tijdstip.ToString("yyy MM dd HH:mm:ss") };
     int id = SQLiteService.ExecuteInsert(ins, args);
 }