From febe5f921b0bc76f8cf64d970faa3a41799348e7 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Sat, 18 May 2024 19:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=A9=BA=E9=97=B4=E4=B8=AD?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=B8=80=E9=94=AE=E6=89=93=E5=BC=80=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=8A=95=E7=A8=BF=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Models/Common/Video/VideoPlaylist.cs | 2 ++ .../Pages/User/FavoriteDetailPage.xaml.cs | 4 ++- .../Pages/User/WatchlaterPage.xaml.cs | 3 +- src/BiliLite.UWP/Pages/UserInfoPage.xaml | 8 ++++- src/BiliLite.UWP/Pages/UserInfoPage.xaml.cs | 33 +++++++++++++++++++ src/BiliLite.UWP/Pages/VideoDetailPage.xaml | 7 ++-- .../Pages/VideoDetailPage.xaml.cs | 2 +- 7 files changed, 52 insertions(+), 7 deletions(-) diff --git a/src/BiliLite.UWP/Models/Common/Video/VideoPlaylist.cs b/src/BiliLite.UWP/Models/Common/Video/VideoPlaylist.cs index ef2be05c..107722bf 100644 --- a/src/BiliLite.UWP/Models/Common/Video/VideoPlaylist.cs +++ b/src/BiliLite.UWP/Models/Common/Video/VideoPlaylist.cs @@ -7,5 +7,7 @@ public class VideoPlaylist public int Index { get; set; } public List Playlist { get; set; } + + public string Title { get; set; } } } \ No newline at end of file diff --git a/src/BiliLite.UWP/Pages/User/FavoriteDetailPage.xaml.cs b/src/BiliLite.UWP/Pages/User/FavoriteDetailPage.xaml.cs index 4a96ec56..98f9bf52 100644 --- a/src/BiliLite.UWP/Pages/User/FavoriteDetailPage.xaml.cs +++ b/src/BiliLite.UWP/Pages/User/FavoriteDetailPage.xaml.cs @@ -28,6 +28,7 @@ public class FavoriteDetailArgs public sealed partial class FavoriteDetailPage : BasePage, IRefreshablePage { FavoriteDetailVM favoriteDetailVM; + public FavoriteDetailPage() { this.InitializeComponent(); @@ -191,7 +192,8 @@ private async void PlayAll_Click(object sender, RoutedEventArgs e) parameters = new VideoPlaylist() { Index = 0, - Playlist = items + Playlist = items, + Title = $"收藏夹:{favoriteDetailVM.FavoriteInfo.title}" } }); } diff --git a/src/BiliLite.UWP/Pages/User/WatchlaterPage.xaml.cs b/src/BiliLite.UWP/Pages/User/WatchlaterPage.xaml.cs index 348df79e..157ff324 100644 --- a/src/BiliLite.UWP/Pages/User/WatchlaterPage.xaml.cs +++ b/src/BiliLite.UWP/Pages/User/WatchlaterPage.xaml.cs @@ -59,7 +59,8 @@ private void Video_ItemClick(object sender, ItemClickEventArgs e) parameters = new VideoPlaylist() { Index = watchLaterVM.Videos.IndexOf(data), - Playlist = items + Playlist = items, + Title = $"稍后再看" } }); } diff --git a/src/BiliLite.UWP/Pages/UserInfoPage.xaml b/src/BiliLite.UWP/Pages/UserInfoPage.xaml index a8f7c298..bd6548a2 100644 --- a/src/BiliLite.UWP/Pages/UserInfoPage.xaml +++ b/src/BiliLite.UWP/Pages/UserInfoPage.xaml @@ -226,6 +226,11 @@ OneRowModeEnabled="False"> + + + + + @@ -235,7 +240,8 @@ 最多播放 - + + diff --git a/src/BiliLite.UWP/Pages/UserInfoPage.xaml.cs b/src/BiliLite.UWP/Pages/UserInfoPage.xaml.cs index 7746477f..db30b459 100644 --- a/src/BiliLite.UWP/Pages/UserInfoPage.xaml.cs +++ b/src/BiliLite.UWP/Pages/UserInfoPage.xaml.cs @@ -7,11 +7,15 @@ using BiliLite.Services; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Navigation; using BiliLite.Models.Common.User; using BiliLite.ViewModels.User; using BiliLite.ViewModels.UserDynamic; using Microsoft.Extensions.DependencyInjection; +using BiliLite.Models.Common.Video; +using BiliLite.Modules; +using System.Collections.Generic; // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 @@ -411,5 +415,34 @@ public async Task Refresh() { throw new System.NotImplementedException(); } + + private void BtnPlayAll_OnTapped(object sender, TappedRoutedEventArgs e) + { + var items = new List(); + foreach (var item in m_userSubmitVideoViewModel.SubmitVideoItems) + { + items.Add(new VideoPlaylistItem() + { + Cover = item.Pic, + Author = item.Author, + Id = item.Aid, + Title = item.Title + }); + + } + + MessageCenter.NavigateToPage(this, new NavigationInfo() + { + icon = Symbol.Play, + page = typeof(VideoDetailPage), + title = "视频播放", + parameters = new VideoPlaylist() + { + Index = 0, + Playlist = items, + Title = $"{m_viewModel.UserInfo.Name}:全部视频", + } + }); + } } } diff --git a/src/BiliLite.UWP/Pages/VideoDetailPage.xaml b/src/BiliLite.UWP/Pages/VideoDetailPage.xaml index 34114267..f692ddc4 100644 --- a/src/BiliLite.UWP/Pages/VideoDetailPage.xaml +++ b/src/BiliLite.UWP/Pages/VideoDetailPage.xaml @@ -347,10 +347,11 @@ RightTapped="txtDesc_RightTapped" Holding="txtDesc_Holding" Tapped="txtDesc_Tapped" IsTextSelectionEnabled="False" - TextTrimming="CharacterEllipsis" + TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Gray" - Text="{x:Bind Path=m_viewModel.VideoInfo.Desc,Mode=OneWay}"> - + Text="{x:Bind Path=m_viewModel.VideoInfo.Desc,Mode=OneWay}"> + + (), }); foreach (var videoPlaylistItem in videoPlaylist.Playlist)