/// <summary> /// Начать проигрывание эпизода /// </summary> private void PlayEpisode() { if (WatchingEpisodesCount <= 0) { _mmvm.IsViewingEnded = true; HotReg?.UnregisterHotkeys(); _mmvm.CloseVideoPlayer(); } else { CurrentEpisode = CheckedEpisodes[++CurrentEpisodeIndex]; CurrentEpisodeTime = new TimeSpan(); PlayVideo(); if (WindowState == WindowState.Normal) { SetFullScreen(); } CurrentEpisode.LastDateViewed = DateTime.Now; UpdateDbCollection(CurrentEpisode); if (IsEpisodeSkipped is false) { WatchingEpisodesCount--; } _mmvm.AvailableEpisodesCount--; } }
/// <summary> /// Действие при выходе /// </summary> public void Exit() { VideoPlayer?.TryClose(); HotReg?.UnregisterHotkeys(); ((MainViewModel)Parent).Exit(); }