コード例 #1
0
ファイル: SeriesEntry.cs プロジェクト: TheSylence/DeVi
		public SeriesEntry( IViewModelContainer viewModelContainer, IDataContainer dataContainer, Series model )
			: base( viewModelContainer, dataContainer )
		{
			Model = model;

			var allEpisodes = Model.Episodes.Where( e => e.SeasonNumber != 0 ).ToArray();

			Episodes = new ObservableCollection<EpisodeEntry>( allEpisodes.Select( e => new EpisodeEntry( viewModelContainer, dataContainer, e, this ) ) );
			Seasons =
				new ObservableCollection<SeasonEntry>( allEpisodes.Select( e => e.SeasonNumber ).Distinct().Select( n => new SeasonEntry( viewModelContainer, dataContainer, n, this ) ) );

			Name = model.Name;
			Rating = model.Rating;
			RatingsCount = model.Ratings;

			if( model.BannerLocation != null )
			{
				BannerUrl = model.BannerLocation;
			}
		}
コード例 #2
0
ファイル: Series.cs プロジェクト: TheSylence/DeVi
        public virtual void Update( Series other )
        {
            Debug.Assert( Id == other.Id );

            Added = other.Added;
            AddedBy = other.AddedBy;
            AirDays = other.AirDays;
            AirTime = other.AirTime;
            BannerLocation = other.BannerLocation;
            ContentRating = other.ContentRating;
            FirstAired = other.FirstAired;
            ImdbId = other.ImdbId;
            LastUpdated = other.LastUpdated;
            Name = other.Name;
            Overview = other.Overview;
            Rating = other.Rating;
            Ratings = other.Ratings;
            Runtime = other.Runtime;
            Status = other.Status;

            // TODO: Update actors
            // TODO: Update genres
            // TODO: Update language
        }