Exemplo n.º 1
0
 /// <summary>
 /// 播放视频列表
 /// </summary>
 /// <param name="aid">AV号</param>
 /// <param name="videoList">播放列表</param>
 public void PlayVideoList(int aid, object sender, List <VideoDetail> videoList)
 {
     CurrentSubPageControl.CheckSubReplyPage();
     SelectedSideMenuItem = null;
     if (sender != null && IsEnableAnimation)
     {
         var image = VisualTreeExtension.VisualTreeFindName <FrameworkElement>((FrameworkElement)sender, "VideoCover");
         ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("VideoConnectedAnimation", image);
     }
     if (App._isTabletMode)
     {
         CurrentTopPanel.SetSelectedItem(AppMenuItemType.Line);
         TabletMainPage.Current.NavigateToPage(AppMenuItemType.VideoPlayer, new Tuple <int, List <VideoDetail> >(aid, videoList));
     }
     else
     {
         CurrentSidePanel.SetSelectedItem(AppMenuItemType.Line);
         CurrentPagePanel.NavigateToPage(AppMenuItemType.VideoPlayer, new Tuple <int, List <VideoDetail> >(aid, videoList));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 播放番剧
 /// </summary>
 /// <param name="epid">AV号</param>
 /// <param name="sender">触发控件(用于查找封面以实现连接动画)</param>
 public void PlayBangumi(int epid, object sender = null, bool isEp = false)
 {
     CurrentSubPageControl.CheckSubReplyPage();
     SelectedSideMenuItem = null;
     if (sender != null && IsEnableAnimation)
     {
         var image = VisualTreeExtension.VisualTreeFindName <FrameworkElement>((FrameworkElement)sender, "VideoCover");
         if (image != null)
         {
             string animationName = "BangumiConnectedAnimation" + Guid.NewGuid().ToString("N");
             ConnectAnimationName = animationName;
             ConnectedAnimationService.GetForCurrentView().PrepareToAnimate(animationName, image);
         }
         else
         {
             ConnectAnimationName = "";
         }
     }
     if (App._isTabletMode)
     {
         CurrentTopPanel.SetSelectedItem(AppMenuItemType.Line);
         TabletMainPage.Current.NavigateToPage(AppMenuItemType.VideoPlayer, new Tuple <int, bool>(epid, isEp));
     }
     else
     {
         CurrentSidePanel.SetSelectedItem(AppMenuItemType.Line);
         if (isEp)
         {
             CurrentPagePanel.NavigateToPage(AppMenuItemType.BangumiPlayer, new Tuple <int, bool>(epid, isEp));
         }
         else
         {
             CurrentPagePanel.NavigateToPage(AppMenuItemType.BangumiPlayer, epid);
         }
     }
 }