private async void UpdateMatch() { SetMatchPropertiesValue(); await Navigation.PopAsync(false); await _viewModel.UpdateMatchAsync(Match, false); await _viewModel.GetMatches(); }
protected async override void OnDisappearing() { base.OnDisappearing(); if (Navigation?.NavigationStack?.LastOrDefault()?.GetType() != typeof(SelectedPlayerPage)) { await _viewModel.UpdateMatchAsync(_viewModel.SelectedLiveMatch, false); } }
private async void OK_Tapped(object sender, EventArgs e) { if (_isMatchTime) { string[] timeTextArray = _totalMatchTime.Split(':') ?? new string[2]; int.TryParse(timeTextArray[0], out int minutes); _viewModel.SelectedLiveMatch.ExtraMinutes = GetMinutesOfMatchPeriod(minutes, _match.StatusID); int.TryParse(timeTextArray[1], out int seconds); _viewModel.SelectedLiveMatch.ExtraSeconds = seconds + 1; _viewModel.SelectedLiveMatch.StatusID = _match.StatusID; _viewModel.SelectedLiveMatch.StatusTime = _match.StatusTime; await _viewModel.UpdateMatchAsync(_viewModel.SelectedLiveMatch, true); } else { EventOfMatch.EventTotalTime = _totalEventMinutesAndSeconds; EventOfMatch.EventPeriodID = _periodID; } await Navigation.PopAsync(false); }