Exemple #1
0
        /// <summary>
        /// Stop playing a movie
        /// </summary>
        private void StopPlayingMovie()
        {
            Logger.Info(
                $"Stop playing movie: {Movie.Title}.");

            IsDownloadingMovie = false;
            DownloadMovie.StopDownloadingMovie();
        }
Exemple #2
0
        /// <summary>
        /// Register commands
        /// </summary>
        private void RegisterCommands()
        {
            LoadMovieCommand = new RelayCommand <MovieShort>(async movie => { await LoadMovieAsync(movie); });

            PlayMovieCommand = new RelayCommand(() =>
            {
                IsDownloadingMovie = true;
                DownloadMovie.LoadMovie(Movie);
            });

            PlayTrailerCommand = new RelayCommand(async() =>
            {
                IsPlayingTrailer = true;
                IsTrailerLoading = true;
                await Trailer.LoadTrailerAsync(Movie, _cancellationLoadingTrailerToken.Token);
                IsTrailerLoading = false;
            });

            StopLoadingTrailerCommand = new RelayCommand(StopLoadingTrailer);
        }
Exemple #3
0
 /// <summary>
 /// Stop playing a movie
 /// </summary>
 private void StopPlayingMovie()
 {
     IsDownloadingMovie = false;
     DownloadMovie?.Cleanup();
     DownloadMovie = null;
 }