private async void SecondaryAppView_Consolidated(ApplicationView sender, ApplicationViewConsolidatedEventArgs args)
        {
            Debug.WriteLine($"SecondaryAppView_Consolidated: IsAppInitiated:{args.IsAppInitiated} IsUserInitiated:{args.IsUserInitiated}");

            await PlaylistPlayer.ClearAsync();

            await SecondaryViewPlayerNavigationService.NavigateAsync(nameof(BlankPage), _BlankPageNavgationTransitionInfo);

            // Note: 1803時点での話
            // VisibleBoundsChanged がアプリ終了前に呼ばれるが
            // この際メインウィンドウとセカンダリウィンドウのウィンドウサイズが互い違いに送られてくるため
            // 直前のウィンドウサイズの値を前々回表示のウィンドウサイズ(_PrevSecondaryViewSize)で上書きする
            if (_PrevSecondaryViewSize != default(Size))
            {
                var localObjectStorageHelper = Microsoft.Toolkit.Mvvm.DependencyInjection.Ioc.Default.GetService <Microsoft.Toolkit.Uwp.Helpers.LocalObjectStorageHelper>();
                localObjectStorageHelper.Save(secondary_view_size, _PrevSecondaryViewSize);
            }

            _scheduler.Schedule(() =>
            {
                IsShowSecondaryView = false;
            });

            LastNavigatedPageName = null;

            // プレイヤーを閉じた時に再生中情報をクリア
            if (!isMainViewClosed)
            {
                Debug.WriteLine("ClearCurrentPlayerEntry secondary view closed.");
                _restoreNavigationManager.ClearCurrentPlayerEntry();
            }
        }
        public async Task ClearVideoPlayerAsync()
        {
            if (PlaylistPlayer == null)
            {
                return;
            }

            await SecondaryCoreAppView.DispatcherQueue.EnqueueAsync(async() =>
            {
                await PlaylistPlayer.ClearAsync();

                SecondaryAppView.Title = "Hohoema";
            });
        }
예제 #3
0
        public async Task CloseAsync()
        {
            if (DisplayMode == PrimaryPlayerDisplayMode.Close)
            {
                return;
            }

            await PlaylistPlayer.ClearAsync();

            LastNavigatedPageName  = null;
            _lastPlayedDisplayMode = DisplayMode == PrimaryPlayerDisplayMode.Close ? _lastPlayedDisplayMode : DisplayMode;
            DisplayMode            = PrimaryPlayerDisplayMode.Close;
            _view.Title            = string.Empty;
            _restoreNavigationManager.ClearCurrentPlayerEntry();
        }
        /// <summary>
        /// SecondaryViewを閉じます。
        /// </summary>
        public async Task CloseAsync()
        {
            if (!IsShowSecondaryView)
            {
                return;
            }

            await SecondaryCoreAppView.DispatcherQueue.EnqueueAsync(async() =>
            {
                await PlaylistPlayer.ClearAsync();

                SecondaryAppView.Title = "Hohoema";

                await SecondaryViewPlayerNavigationService.NavigateAsync(nameof(BlankPage), _BlankPageNavgationTransitionInfo);

                await Task.Delay(250);

                await SecondaryAppView.TryConsolidateAsync();
            });

            await ShowMainViewAsync();
        }
예제 #5
0
        public async Task ClearVideoPlayerAsync()
        {
            await PlaylistPlayer.ClearAsync();

            SetTitle("Hohoema");
        }
예제 #6
0
 public async Task ClearVideoPlayerAsync()
 {
     await PlaylistPlayer.ClearAsync();
 }