示例#1
0
        private async void LoadRelatedShows()
        {
            this.progressBarLoading.Visibility = System.Windows.Visibility.Visible;

            TraktShow[] relatedShows = await showController.getRelatedShows(this.Show.tvdb_id);

            foreach (TraktShow relatedShow in relatedShows)
            {
                ListItemViewModel newModel = new ListItemViewModel()
                {
                    ImageSource = relatedShow.Images.Poster, Tvdb = relatedShow.tvdb_id, Type = "show"
                };
                App.ShowViewModel.RelatedShows.Add(newModel);
                newModel.LoadPosterImage();
            }

            App.ShowViewModel.RefreshRelatedShows();
            this.progressBarLoading.Visibility = System.Windows.Visibility.Collapsed;
        }