Ejemplo n.º 1
0
		public EpisodeEntry( IViewModelContainer viewModelContainer, IDataContainer dataContainer, Episode model, SeriesEntry series )
			: base( viewModelContainer, dataContainer )
		{
			Series = series;
			Model = model;

			if( model.BannerLocation != null )
			{
				BannerUrl = model.BannerLocation;
			}
		}
Ejemplo n.º 2
0
		private async void ExecuteDeleteCommand( SeriesEntry entry )
		{
			ConfirmationServiceArgs csa = new ConfirmationServiceArgs( Strings.ConfirmAction, Strings.ConfirmRemoveMessage );
			if( !await ViewServices.Execute<IConfirmationService, bool>( csa ) )
			{
				return;
			}

			Repositories.Series.Delete( entry.Model );

			if( SelectedSeries == entry )
			{
				SelectedSeries = Series.FirstOrDefault( s => s != entry );
			}

			Series.Remove( entry );
		}
Ejemplo n.º 3
0
		private async void ExecuteAddCommand()
		{
			uint id = await ViewServices.Execute<IAddSeriesService, uint>();
			if( id == 0 )
			{
				// User cancelled
				return;
			}

			var series = Repositories.Series.GetById( id );
			if( series != null )
			{
				// TODO: Inform user that show was already added
				return;
			}

			series = await TvDB.GetFullSeriesRecord( id, Settings.ContentLanguage.TwoLetterISOLanguageName );

			var entry = new SeriesEntry( ViewModelContainer, DataContainer, series );
			Series.Add( entry );

			entry.Load();
		}
Ejemplo n.º 4
0
		public SeasonEntry( IViewModelContainer viewModelContainer, IDataContainer dataContainer, uint seasonNumber, SeriesEntry series )
			: base( viewModelContainer, dataContainer )
		{
			Series = series;
			SeasonNumber = seasonNumber;
		}