コード例 #1
0
        protected override void OnActivate()
        {
            base.OnActivate();

            if (this.episode == null)
            {
                this.host.GetTvEpisodes(this.TvshowId, this.season, episodes =>
                    {
                        var ep = episodes.Where(e => e.Episode == this.episodeNr.ToString()).FirstOrDefault();
                        if (ep == null)
                        {
                            this.navigationService.GoBack();
                        }

                        this.episode = ep;
                        NotifyOfPropertyChange(() => this.Title);
                        NotifyOfPropertyChange(() => this.Year);
                        NotifyOfPropertyChange(() => this.Rating);
                        NotifyOfPropertyChange(() => this.Director);
                        NotifyOfPropertyChange(() => this.Plot);
                        NotifyOfPropertyChange(() => this.LastPlayed);
                        NotifyOfPropertyChange(() => this.ShowTitle);
                        NotifyOfPropertyChange(() => this.FirstAired);
                        NotifyOfPropertyChange(() => this.Duration);
                        NotifyOfPropertyChange(() => this.Season);
                        NotifyOfPropertyChange(() => this.Episode);
                        NotifyOfPropertyChange(() => this.PlayCount);
                        NotifyOfPropertyChange(() => this.Writer);
                        NotifyOfPropertyChange(() => this.Studio);
                        NotifyOfPropertyChange(() => this.MPAA);
                        NotifyOfPropertyChange(() => this.Premiered);
                    });
            }
        }
コード例 #2
0
 internal TvEpisodeViewModel(IXbmcHost host, INavigationService navigationService, TvEpisode episode)
     : this(host, navigationService)
 {
     this.episode = episode;
 }