Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 private void DJIDrone_SatelliteCountChanged(object sender, IntMsg?value)
 {
     RunOnUIThread(() => GPSs.First().SateliteCount = value.HasValue ? value.Value.value : 0);
 }