VideoViewerPage.xaml 的交互逻辑
상속: System.Windows.Controls.Page
        internal static VideoViewerPage BuildPage(VideoInfoViewModel info)
        {
            var vm = new VideoViewerViewModel(info);

            var page = new VideoViewerPage()
            {
                ViewModel = vm,
                DataContext = vm
            };

            Engines.ForEach(z => AppendToContextMenu(page.SeriesContextMenu, z));
            return page;
        }
예제 #2
0
        private void ExitVideoViewerPage(VideoViewerPage page)
        {
            page.ClickedGoBack -= this.VideoViewerPage_ClickedGoBack;
            page.ClickedOtherVideo -= this.VideoViewerPage_ClickedOtherVideo;

            Debug.Assert(page != null);
            page.ViewModel.InfoView.SeriesView.PropertiesRefreshed -= this.InfoView_PropertiesRefreshed;
            page.ViewModel.Flush();
            this.CaptionTextBlock.Text = Caption;
            Debug.Assert(this.MainFrame.CanGoBack);
            this.MainFrame.GoBack();
            this.MainPage.RefreshVideo(page.ViewModel.InfoView);
        }
예제 #3
0
        private async void NavigateToVideoViewerPage(VideoInfoViewModel info)
        {
            var page = new VideoViewerPage(info);
            page.ClickedGoBack += this.VideoViewerPage_ClickedGoBack;
            page.ClickedOtherVideo += this.VideoViewerPage_ClickedOtherVideo;

            page.ViewModel.InfoView.SeriesView.PropertiesRefreshed += this.InfoView_PropertiesRefreshed;
            this.CaptionTextBlock.Text = Caption + " | " + info.SeriesView.NameViewModel.FirstLine;
            this.MainFrame.Navigate(page);
            await page.ViewModel.LoadAsync();
        }