/// <summary> /// Stops the current Round /// </summary> /// <param name="obj"></param> private async Task StopRound(object obj) { //If round is locked, end round without uploading if (IsRoundLocked) { await RoundManager.CancelRound(); } else { //upload the current round. This needs to hapen first, so we can set all RoundId values on the readings. if (RoundManager.CurrentRound?.RegionId != null && RoundManager.CurrentRound?.RegionId != Guid.Empty) { var round = await UploadRoundAsync(); if (round != null && round.Id != Guid.Empty) { //update the RoundId on all the readings PRIOR to sending to the server. await UploadReadingsAsync(round.Id); } } else { await RoundManager.CancelRound(); } } Navigator.Navigate(Navigation.NavigationType.Home); }