diff --git a/src/DownKyi/ViewModels/ViewChannelViewModel.cs b/src/DownKyi/ViewModels/ViewChannelViewModel.cs index 2bd5ec2..8c1d0f1 100644 --- a/src/DownKyi/ViewModels/ViewChannelViewModel.cs +++ b/src/DownKyi/ViewModels/ViewChannelViewModel.cs @@ -75,6 +75,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private string title; public string Title { @@ -127,6 +134,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + Medias = new ObservableCollection(); #endregion @@ -157,6 +170,24 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 全选按钮点击事件 private DelegateCommand selectAllCommand; public DelegateCommand SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand(ExecuteSelectAllCommand)); @@ -411,8 +442,11 @@ namespace DownKyi.ViewModels base.OnNavigatedTo(navigationContext); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); - Medias.Clear(); - IsSelectAll = false; + + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); // 根据传入参数不同执行不同任务 var parameter = navigationContext.Parameters.GetValue>("Parameter"); @@ -421,6 +455,9 @@ namespace DownKyi.ViewModels return; } + Medias.Clear(); + IsSelectAll = false; + mid = (long)parameter["mid"]; cid = (long)parameter["cid"]; Title = (string)parameter["name"]; diff --git a/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs b/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs index caa760e..60365f1 100644 --- a/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs +++ b/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs @@ -52,6 +52,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private ObservableCollection tabHeaders; public ObservableCollection TabHeaders { @@ -139,6 +146,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + TabHeaders = new ObservableCollection { new TabHeader { Id = (int)Core.BiliApi.Users.Models.BangumiType.ANIME, Title = DictionaryResource.GetString("FollowAnime") }, @@ -178,12 +191,30 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 顶部tab点击事件 private DelegateCommand tabHeadersCommand; public DelegateCommand TabHeadersCommand => tabHeadersCommand ?? (tabHeadersCommand = new DelegateCommand(ExecuteTabHeadersCommand, CanExecuteTabHeadersCommand)); /// - /// 左侧tab点击事件 + /// 顶部tab点击事件 /// /// private void ExecuteTabHeadersCommand(object parameter) @@ -489,6 +520,11 @@ namespace DownKyi.ViewModels ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + // 根据传入参数不同执行不同任务 mid = navigationContext.Parameters.GetValue("Parameter"); if (mid == 0) diff --git a/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs b/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs index 7e8e7bf..1787e99 100644 --- a/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs +++ b/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs @@ -109,6 +109,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private ObservableCollection tabHeaders; public ObservableCollection TabHeaders { @@ -173,6 +180,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + TabHeaders = new ObservableCollection(); Medias = new ObservableCollection(); @@ -207,6 +220,24 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 左侧tab点击事件 private DelegateCommand leftTabHeadersCommand; public DelegateCommand LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand)); @@ -428,6 +459,11 @@ namespace DownKyi.ViewModels { ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + ContentVisibility = Visibility.Collapsed; LoadingVisibility = Visibility.Visible; NoDataVisibility = Visibility.Collapsed; diff --git a/src/DownKyi/ViewModels/ViewMyHistoryViewModel.cs b/src/DownKyi/ViewModels/ViewMyHistoryViewModel.cs index cafc2e3..6f9906a 100644 --- a/src/DownKyi/ViewModels/ViewMyHistoryViewModel.cs +++ b/src/DownKyi/ViewModels/ViewMyHistoryViewModel.cs @@ -51,6 +51,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private Visibility contentVisibility; public Visibility ContentVisibility { @@ -110,6 +117,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + Medias = new ObservableCollection(); #endregion @@ -143,6 +156,24 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 全选按钮点击事件 private DelegateCommand selectAllCommand; public DelegateCommand SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand(ExecuteSelectAllCommand)); @@ -459,6 +490,11 @@ namespace DownKyi.ViewModels { ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + ContentVisibility = Visibility.Collapsed; LoadingVisibility = Visibility.Collapsed; NoDataVisibility = Visibility.Collapsed; @@ -477,6 +513,11 @@ namespace DownKyi.ViewModels ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + // 根据传入参数不同执行不同任务 long mid = navigationContext.Parameters.GetValue("Parameter"); if (mid == 0) diff --git a/src/DownKyi/ViewModels/ViewMyToViewVideoViewModel.cs b/src/DownKyi/ViewModels/ViewMyToViewVideoViewModel.cs index d55ab01..1635bb9 100644 --- a/src/DownKyi/ViewModels/ViewMyToViewVideoViewModel.cs +++ b/src/DownKyi/ViewModels/ViewMyToViewVideoViewModel.cs @@ -47,6 +47,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private Visibility contentVisibility; public Visibility ContentVisibility { @@ -106,6 +113,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + Medias = new ObservableCollection(); #endregion @@ -139,6 +152,24 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 全选按钮点击事件 private DelegateCommand selectAllCommand; public DelegateCommand SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand(ExecuteSelectAllCommand)); @@ -378,6 +409,11 @@ namespace DownKyi.ViewModels ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + // 根据传入参数不同执行不同任务 long mid = navigationContext.Parameters.GetValue("Parameter"); if (mid == 0) diff --git a/src/DownKyi/ViewModels/ViewPublicFavoritesViewModel.cs b/src/DownKyi/ViewModels/ViewPublicFavoritesViewModel.cs index 2500437..98f2457 100644 --- a/src/DownKyi/ViewModels/ViewPublicFavoritesViewModel.cs +++ b/src/DownKyi/ViewModels/ViewPublicFavoritesViewModel.cs @@ -46,6 +46,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private Favorites favorites; public Favorites Favorites { @@ -132,6 +139,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + FavoritesMedias = new ObservableCollection(); #endregion @@ -160,6 +173,24 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 复制封面事件 private DelegateCommand copyCoverCommand; public DelegateCommand CopyCoverCommand => copyCoverCommand ?? (copyCoverCommand = new DelegateCommand(ExecuteCopyCoverCommand)); @@ -298,6 +329,11 @@ namespace DownKyi.ViewModels ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + ContentVisibility = Visibility.Collapsed; LoadingVisibility = Visibility.Collapsed; NoDataVisibility = Visibility.Collapsed; diff --git a/src/DownKyi/ViewModels/ViewPublicationViewModel.cs b/src/DownKyi/ViewModels/ViewPublicationViewModel.cs index 32047d7..9b5f337 100644 --- a/src/DownKyi/ViewModels/ViewPublicationViewModel.cs +++ b/src/DownKyi/ViewModels/ViewPublicationViewModel.cs @@ -75,6 +75,13 @@ namespace DownKyi.ViewModels set => SetProperty(ref arrowBack, value); } + private VectorImage downloadManage; + public VectorImage DownloadManage + { + get => downloadManage; + set => SetProperty(ref downloadManage, value); + } + private ObservableCollection tabHeaders; public ObservableCollection TabHeaders { @@ -134,6 +141,12 @@ namespace DownKyi.ViewModels ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + TabHeaders = new ObservableCollection(); Medias = new ObservableCollection(); @@ -165,6 +178,24 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } + // 前往下载管理页面 + private DelegateCommand downloadManagerCommand; + public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand)); + + /// + /// 前往下载管理页面 + /// + private void ExecuteDownloadManagerCommand() + { + NavigationParam parameter = new NavigationParam + { + ViewName = ViewDownloadManagerViewModel.Tag, + ParentViewName = Tag, + Parameter = null + }; + eventAggregator.GetEvent().Publish(parameter); + } + // 左侧tab点击事件 private DelegateCommand leftTabHeadersCommand; public DelegateCommand LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand)); @@ -444,6 +475,11 @@ namespace DownKyi.ViewModels { ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + DownloadManage = ButtonIcon.Instance().DownloadManage; + DownloadManage.Height = 24; + DownloadManage.Width = 24; + DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary"); + TabHeaders.Clear(); Medias.Clear(); SelectTabId = -1; diff --git a/src/DownKyi/ViewModels/ViewUserSpaceViewModel.cs b/src/DownKyi/ViewModels/ViewUserSpaceViewModel.cs index 9cecb51..96511b7 100644 --- a/src/DownKyi/ViewModels/ViewUserSpaceViewModel.cs +++ b/src/DownKyi/ViewModels/ViewUserSpaceViewModel.cs @@ -200,7 +200,6 @@ namespace DownKyi.ViewModels eventAggregator.GetEvent().Publish(parameter); } - // 左侧tab点击事件 private DelegateCommand tabLeftBannersCommand; public DelegateCommand TabLeftBannersCommand => tabLeftBannersCommand ?? (tabLeftBannersCommand = new DelegateCommand(ExecuteTabLeftBannersCommand)); diff --git a/src/DownKyi/ViewModels/ViewVideoDetailViewModel.cs b/src/DownKyi/ViewModels/ViewVideoDetailViewModel.cs index 088a7ae..1ed6c46 100644 --- a/src/DownKyi/ViewModels/ViewVideoDetailViewModel.cs +++ b/src/DownKyi/ViewModels/ViewVideoDetailViewModel.cs @@ -113,9 +113,11 @@ namespace DownKyi.ViewModels Loading.StartAnimate(); LoadingVisibility = Visibility.Collapsed; + // 返回按钮 ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); + // 下载管理按钮 DownloadManage = ButtonIcon.Instance().DownloadManage; DownloadManage.Height = 24; DownloadManage.Width = 24; @@ -753,10 +755,10 @@ namespace DownKyi.ViewModels { string param = navigationContext.Parameters.GetValue("Parameter"); // 移除剪贴板id - string intput = param.Replace(AppConstant.ClipboardId, ""); + string input = param.Replace(AppConstant.ClipboardId, ""); // 检测是否从剪贴板传入 - if (InputText == intput && param.EndsWith(AppConstant.ClipboardId)) + if (InputText == input && param.EndsWith(AppConstant.ClipboardId)) { return; } @@ -764,7 +766,7 @@ namespace DownKyi.ViewModels // 正在执行任务时不开启新任务 if (LoadingVisibility != Visibility.Visible) { - InputText = intput; + InputText = input; PropertyChangeAsync(ExecuteInputCommand); } } diff --git a/src/DownKyi/Views/ViewChannel.xaml b/src/DownKyi/Views/ViewChannel.xaml index 9861189..8d3ef46 100644 --- a/src/DownKyi/Views/ViewChannel.xaml +++ b/src/DownKyi/Views/ViewChannel.xaml @@ -124,8 +124,9 @@ + - + + + diff --git a/src/DownKyi/Views/ViewMyBangumiFollow.xaml b/src/DownKyi/Views/ViewMyBangumiFollow.xaml index ab25214..e5344dd 100644 --- a/src/DownKyi/Views/ViewMyBangumiFollow.xaml +++ b/src/DownKyi/Views/ViewMyBangumiFollow.xaml @@ -226,6 +226,26 @@ + + diff --git a/src/DownKyi/Views/ViewMyFavorites.xaml b/src/DownKyi/Views/ViewMyFavorites.xaml index 97e73df..2ca2f5a 100644 --- a/src/DownKyi/Views/ViewMyFavorites.xaml +++ b/src/DownKyi/Views/ViewMyFavorites.xaml @@ -192,6 +192,26 @@ Text="{DynamicResource PublicFavorites}" /> + + diff --git a/src/DownKyi/Views/ViewMyHistory.xaml b/src/DownKyi/Views/ViewMyHistory.xaml index d8052bf..3ecf125 100644 --- a/src/DownKyi/Views/ViewMyHistory.xaml +++ b/src/DownKyi/Views/ViewMyHistory.xaml @@ -235,6 +235,26 @@ Text="{DynamicResource MyHistory}" /> + + diff --git a/src/DownKyi/Views/ViewMyToViewVideo.xaml b/src/DownKyi/Views/ViewMyToViewVideo.xaml index a869876..6058057 100644 --- a/src/DownKyi/Views/ViewMyToViewVideo.xaml +++ b/src/DownKyi/Views/ViewMyToViewVideo.xaml @@ -159,6 +159,26 @@ Text="{DynamicResource MyToView}" /> + + diff --git a/src/DownKyi/Views/ViewPublicFavorites.xaml b/src/DownKyi/Views/ViewPublicFavorites.xaml index f0563a5..7f52333 100644 --- a/src/DownKyi/Views/ViewPublicFavorites.xaml +++ b/src/DownKyi/Views/ViewPublicFavorites.xaml @@ -43,6 +43,26 @@ Text="{DynamicResource PublicFavorites}" /> + + diff --git a/src/DownKyi/Views/ViewPublication.xaml b/src/DownKyi/Views/ViewPublication.xaml index 5689387..143ab84 100644 --- a/src/DownKyi/Views/ViewPublication.xaml +++ b/src/DownKyi/Views/ViewPublication.xaml @@ -153,6 +153,26 @@ Text="{DynamicResource Publication}" /> + +