public async Task <IActionResult> Edit(int id, [Bind("IdGPS,Lat,LON,Ele,Time,Name,Comment")] GPSs gPSs) { if (id != gPSs.IdGPS) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(gPSs); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GPSsExists(gPSs.IdGPS)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(gPSs)); }
public async Task <IActionResult> Create([Bind("IdGPS,Lat,LON,Ele,Time,Name,Comment")] GPSs gPSs) { if (ModelState.IsValid) { _context.Add(gPSs); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(gPSs)); }
private void DJIDrone_SatelliteCountChanged(object sender, IntMsg?value) { RunOnUIThread(() => GPSs.First().SateliteCount = value.HasValue ? value.Value.value : 0); }