private async void LoadMatchData() { LoadingDataLabel.IsVisible = true; ErrorLoadingDataLabel.IsVisible = false; TryAgainBottom.IsVisible = false; EventsGrid.IsVisible = false; IsEnabled = false; _viewModel.SelectedLiveMatch.Statuses = _viewModel.Statuses; bool loadResult = await _viewModel.GetSelectedLiveMatch(_viewModel.SelectedLiveMatch, true); if (loadResult) { LoadingMatchDataGrid.IsVisible = false; EventsOfMatchGrid.IsVisible = true; } else { LoadingDataLabel.IsVisible = false; ErrorLoadingDataLabel.IsVisible = true; TryAgainBottom.IsVisible = true; } EventsGrid.IsVisible = true; IsEnabled = true; }
private async Task LoadSelectedMatchDataAsync(MatchesViewModel viewModel) { await viewModel.GetSelectedLiveMatch(viewModel.SelectedLiveMatch); viewModel.TimeCounter.MatchesTime(viewModel, new ObservableCollection <Match>()); viewModel.IsLoadingSelectedMatch = false; }
public async Task <bool> RefreshSelectedMatchData() { bool success = true; if (_viewModel?.SelectedMatch?.MatchID > 0) { success = await _viewModel.GetSelectedLiveMatch(_viewModel.SelectedMatch); _viewModel.IsLoadingSelectedMatch = false; } return(success); }