Beispiel #1
0
 public EpisodeView(Episode episode, bool hasBackground, SeriesEpisodes episodeView)
 {
     InitializeComponent();
     this.episode       = episode;
     this.hasBackground = hasBackground;
     this.episodeView   = episodeView;
 }
Beispiel #2
0
 public SeasonView(List <Episode> episodes, Series series, SeriesEpisodes episodeView)
 {
     InitializeComponent();
     this.episodes       = episodes;
     this.series         = series;
     this.seriesEpisodes = episodeView;
 }
Beispiel #3
0
        public static void RightClickEvent(SeriesEpisodes episodeView, Episode episode)
        {
            var sb    = (Storyboard)Application.Current.FindResource("OpacityDown");
            var clone = sb.Clone();

            clone.Completed += (s, ev) => {
                episodeView.DetailsGrid.Children.RemoveRange(0, episodeView.DetailsGrid.Children.Count);
                episodeView.DetailsGrid.Children.Add(new EpisodeDetails(episode));
                Storyboard up = (Storyboard)Application.Current.FindResource("OpacityUp");
                up.Begin(episodeView.DetailsGrid);
            };
            clone.Begin(episodeView.DetailsGrid);
            episodeView.ScrollView.ScrollToTop();
        }
Beispiel #4
0
 private async void Return()
 {
     Helper.EnableScreenSaver();
     MainWindow.ShowContent();
     PlayerPage.MouseMove -= Page_MouseMove;
     timer.Stop();
     MainWindow.videoPlayback = false;
     MainWindow.SwitchState(MainWindow.PlayerState.Normal);
     episode.continueAt = Player.MediaPosition - 50000000 > 0 ? Player.MediaPosition - 50000000 : 0;
     episode.finished   = Player.MediaDuration - 3000000000 < Player.MediaPosition ? true : false;
     Database.EditEpisode(series.id, episode.id, episode);
     MainWindow.RemovePage();
     SeriesEpisodes.TryRefresh();
     Mouse.OverrideCursor = null;
 }
        private void NextEpisode_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var     episodes  = Database.GetEpisodes((int)episode.seriesId);
            var     highestEp = episodes.Where(x => x.airedSeason == episode.airedSeason && !String.IsNullOrEmpty(x.firstAired) && Helper.ParseAirDate(x.firstAired).AddDays(1) < DateTime.Now).Max(x => x.airedEpisodeNumber);
            Episode newEp     = null;

            if (highestEp == episode.airedEpisodeNumber)
            {
                newEp = episodes.Where(x => x.airedSeason == episode.airedSeason + 1 && x.airedEpisodeNumber == 1).FirstOrDefault();
            }
            else
            {
                newEp = episodes.Where(x => x.airedEpisodeNumber == episode.airedEpisodeNumber + 1 && x.airedSeason == episode.airedSeason).FirstOrDefault();
            }
            if (newEp != null)
            {
                SeriesEpisodes.SetDetails(newEp);
            }
        }
 private void PreviousEpisode_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     if (!(episode.airedSeason == 1 && episode.airedEpisodeNumber == 1))
     {
         var     episodes = Database.GetEpisodes((int)episode.seriesId);
         Episode newEp    = null;
         if (1 == episode.airedEpisodeNumber)
         {
             var highestEp = episodes.Where(x => x.airedSeason == episode.airedSeason - 1).Max(x => x.airedEpisodeNumber);
             newEp = episodes.Where(x => x.airedSeason == episode.airedSeason - 1 && x.airedEpisodeNumber == highestEp).FirstOrDefault();
         }
         else
         {
             newEp = episodes.Where(x => x.airedEpisodeNumber == episode.airedEpisodeNumber - 1 && x.airedSeason == episode.airedSeason).FirstOrDefault();
         }
         if (newEp != null)
         {
             SeriesEpisodes.SetDetails(newEp);
         }
     }
 }
 private void Back_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     SeriesEpisodes.TryRefresh();
 }
Beispiel #8
0
 public EpisodeButtons(SeriesEpisodes owner)
 {
     InitializeComponent();
     this.owner = owner;
 }