void FullscreenVideoPage_Unloaded(object sender, RoutedEventArgs e) { if (_activityTimer != null) { _activityTimer.Dispose(); _activityTimer = null; } DisposeOsdTimer(); _userInputManager.MouseMove -= _userInputManager_MouseMove; _presentation.SetGlobalThemeContentVisibility(true); _playbackManager.PlaybackCompleted -= _playbackManager_PlaybackCompleted; if (_viewModel != null) { _viewModel.Dispose(); } if (_infoWindow != null) { Dispatcher.Invoke(() => { _infoWindow.Close(); _infoWindow = null; }); } }
public void ShowInfoPanel() { Dispatcher.InvokeAsync(() => { HideOsd(); if (_infoWindow != null) { return; } _infoWindow = new InfoWindow() { DataContext = _viewModel }; _infoWindow.ShowModal(_presentation.Window); _infoWindow = null; IsMouseIdle = true; }, DispatcherPriority.Background); }
async void _playbackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e) { if (_infoWindow != null) { Dispatcher.Invoke(() => { _infoWindow.Close(); _infoWindow = null; }); } await _nav.NavigateBack(); }