コード例 #1
0
        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;
        }
コード例 #2
0
        private async Task LoadSelectedMatchDataAsync(MatchesViewModel viewModel)
        {
            await viewModel.GetSelectedLiveMatch(viewModel.SelectedLiveMatch);

            viewModel.TimeCounter.MatchesTime(viewModel, new ObservableCollection <Match>());
            viewModel.IsLoadingSelectedMatch = false;
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: predrag1977/DystirSuite
        public async Task <bool> RefreshSelectedMatchData()
        {
            bool success = true;

            if (_viewModel?.SelectedMatch?.MatchID > 0)
            {
                success = await _viewModel.GetSelectedLiveMatch(_viewModel.SelectedMatch);

                _viewModel.IsLoadingSelectedMatch = false;
            }
            return(success);
        }