每个视频页面都增加下载管理页面入口

html
leiurayer 2 years ago
parent 94969e461d
commit f8f9211046

@ -75,6 +75,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private string title; private string title;
public string Title public string Title
{ {
@ -127,6 +134,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
Medias = new ObservableCollection<ChannelMedia>(); Medias = new ObservableCollection<ChannelMedia>();
#endregion #endregion
@ -157,6 +170,24 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 全选按钮点击事件 // 全选按钮点击事件
private DelegateCommand<object> selectAllCommand; private DelegateCommand<object> selectAllCommand;
public DelegateCommand<object> SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand<object>(ExecuteSelectAllCommand)); public DelegateCommand<object> SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand<object>(ExecuteSelectAllCommand));
@ -411,8 +442,11 @@ namespace DownKyi.ViewModels
base.OnNavigatedTo(navigationContext); base.OnNavigatedTo(navigationContext);
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); 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<Dictionary<string, object>>("Parameter"); var parameter = navigationContext.Parameters.GetValue<Dictionary<string, object>>("Parameter");
@ -421,6 +455,9 @@ namespace DownKyi.ViewModels
return; return;
} }
Medias.Clear();
IsSelectAll = false;
mid = (long)parameter["mid"]; mid = (long)parameter["mid"];
cid = (long)parameter["cid"]; cid = (long)parameter["cid"];
Title = (string)parameter["name"]; Title = (string)parameter["name"];

@ -52,6 +52,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private ObservableCollection<TabHeader> tabHeaders; private ObservableCollection<TabHeader> tabHeaders;
public ObservableCollection<TabHeader> TabHeaders public ObservableCollection<TabHeader> TabHeaders
{ {
@ -139,6 +146,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
TabHeaders = new ObservableCollection<TabHeader> TabHeaders = new ObservableCollection<TabHeader>
{ {
new TabHeader { Id = (int)Core.BiliApi.Users.Models.BangumiType.ANIME, Title = DictionaryResource.GetString("FollowAnime") }, new TabHeader { Id = (int)Core.BiliApi.Users.Models.BangumiType.ANIME, Title = DictionaryResource.GetString("FollowAnime") },
@ -178,12 +191,30 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 顶部tab点击事件 // 顶部tab点击事件
private DelegateCommand<object> tabHeadersCommand; private DelegateCommand<object> tabHeadersCommand;
public DelegateCommand<object> TabHeadersCommand => tabHeadersCommand ?? (tabHeadersCommand = new DelegateCommand<object>(ExecuteTabHeadersCommand, CanExecuteTabHeadersCommand)); public DelegateCommand<object> TabHeadersCommand => tabHeadersCommand ?? (tabHeadersCommand = new DelegateCommand<object>(ExecuteTabHeadersCommand, CanExecuteTabHeadersCommand));
/// <summary> /// <summary>
/// 左侧tab点击事件 /// 顶部tab点击事件
/// </summary> /// </summary>
/// <param name="parameter"></param> /// <param name="parameter"></param>
private void ExecuteTabHeadersCommand(object parameter) private void ExecuteTabHeadersCommand(object parameter)
@ -489,6 +520,11 @@ namespace DownKyi.ViewModels
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
// 根据传入参数不同执行不同任务 // 根据传入参数不同执行不同任务
mid = navigationContext.Parameters.GetValue<long>("Parameter"); mid = navigationContext.Parameters.GetValue<long>("Parameter");
if (mid == 0) if (mid == 0)

@ -109,6 +109,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private ObservableCollection<TabHeader> tabHeaders; private ObservableCollection<TabHeader> tabHeaders;
public ObservableCollection<TabHeader> TabHeaders public ObservableCollection<TabHeader> TabHeaders
{ {
@ -173,6 +180,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
TabHeaders = new ObservableCollection<TabHeader>(); TabHeaders = new ObservableCollection<TabHeader>();
Medias = new ObservableCollection<FavoritesMedia>(); Medias = new ObservableCollection<FavoritesMedia>();
@ -207,6 +220,24 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 左侧tab点击事件 // 左侧tab点击事件
private DelegateCommand<object> leftTabHeadersCommand; private DelegateCommand<object> leftTabHeadersCommand;
public DelegateCommand<object> LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand<object>(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand)); public DelegateCommand<object> LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand<object>(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand));
@ -428,6 +459,11 @@ namespace DownKyi.ViewModels
{ {
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
ContentVisibility = Visibility.Collapsed; ContentVisibility = Visibility.Collapsed;
LoadingVisibility = Visibility.Visible; LoadingVisibility = Visibility.Visible;
NoDataVisibility = Visibility.Collapsed; NoDataVisibility = Visibility.Collapsed;

@ -51,6 +51,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private Visibility contentVisibility; private Visibility contentVisibility;
public Visibility ContentVisibility public Visibility ContentVisibility
{ {
@ -110,6 +117,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
Medias = new ObservableCollection<HistoryMedia>(); Medias = new ObservableCollection<HistoryMedia>();
#endregion #endregion
@ -143,6 +156,24 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 全选按钮点击事件 // 全选按钮点击事件
private DelegateCommand<object> selectAllCommand; private DelegateCommand<object> selectAllCommand;
public DelegateCommand<object> SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand<object>(ExecuteSelectAllCommand)); public DelegateCommand<object> SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand<object>(ExecuteSelectAllCommand));
@ -459,6 +490,11 @@ namespace DownKyi.ViewModels
{ {
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
ContentVisibility = Visibility.Collapsed; ContentVisibility = Visibility.Collapsed;
LoadingVisibility = Visibility.Collapsed; LoadingVisibility = Visibility.Collapsed;
NoDataVisibility = Visibility.Collapsed; NoDataVisibility = Visibility.Collapsed;
@ -477,6 +513,11 @@ namespace DownKyi.ViewModels
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); 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<long>("Parameter"); long mid = navigationContext.Parameters.GetValue<long>("Parameter");
if (mid == 0) if (mid == 0)

@ -47,6 +47,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private Visibility contentVisibility; private Visibility contentVisibility;
public Visibility ContentVisibility public Visibility ContentVisibility
{ {
@ -106,6 +113,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
Medias = new ObservableCollection<ToViewMedia>(); Medias = new ObservableCollection<ToViewMedia>();
#endregion #endregion
@ -139,6 +152,24 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 全选按钮点击事件 // 全选按钮点击事件
private DelegateCommand<object> selectAllCommand; private DelegateCommand<object> selectAllCommand;
public DelegateCommand<object> SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand<object>(ExecuteSelectAllCommand)); public DelegateCommand<object> SelectAllCommand => selectAllCommand ?? (selectAllCommand = new DelegateCommand<object>(ExecuteSelectAllCommand));
@ -378,6 +409,11 @@ namespace DownKyi.ViewModels
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); 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<long>("Parameter"); long mid = navigationContext.Parameters.GetValue<long>("Parameter");
if (mid == 0) if (mid == 0)

@ -46,6 +46,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private Favorites favorites; private Favorites favorites;
public Favorites Favorites public Favorites Favorites
{ {
@ -132,6 +139,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
FavoritesMedias = new ObservableCollection<FavoritesMedia>(); FavoritesMedias = new ObservableCollection<FavoritesMedia>();
#endregion #endregion
@ -160,6 +173,24 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 复制封面事件 // 复制封面事件
private DelegateCommand copyCoverCommand; private DelegateCommand copyCoverCommand;
public DelegateCommand CopyCoverCommand => copyCoverCommand ?? (copyCoverCommand = new DelegateCommand(ExecuteCopyCoverCommand)); public DelegateCommand CopyCoverCommand => copyCoverCommand ?? (copyCoverCommand = new DelegateCommand(ExecuteCopyCoverCommand));
@ -298,6 +329,11 @@ namespace DownKyi.ViewModels
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
ContentVisibility = Visibility.Collapsed; ContentVisibility = Visibility.Collapsed;
LoadingVisibility = Visibility.Collapsed; LoadingVisibility = Visibility.Collapsed;
NoDataVisibility = Visibility.Collapsed; NoDataVisibility = Visibility.Collapsed;

@ -75,6 +75,13 @@ namespace DownKyi.ViewModels
set => SetProperty(ref arrowBack, value); set => SetProperty(ref arrowBack, value);
} }
private VectorImage downloadManage;
public VectorImage DownloadManage
{
get => downloadManage;
set => SetProperty(ref downloadManage, value);
}
private ObservableCollection<TabHeader> tabHeaders; private ObservableCollection<TabHeader> tabHeaders;
public ObservableCollection<TabHeader> TabHeaders public ObservableCollection<TabHeader> TabHeaders
{ {
@ -134,6 +141,12 @@ namespace DownKyi.ViewModels
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
TabHeaders = new ObservableCollection<TabHeader>(); TabHeaders = new ObservableCollection<TabHeader>();
Medias = new ObservableCollection<PublicationMedia>(); Medias = new ObservableCollection<PublicationMedia>();
@ -165,6 +178,24 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 前往下载管理页面
private DelegateCommand downloadManagerCommand;
public DelegateCommand DownloadManagerCommand => downloadManagerCommand ?? (downloadManagerCommand = new DelegateCommand(ExecuteDownloadManagerCommand));
/// <summary>
/// 前往下载管理页面
/// </summary>
private void ExecuteDownloadManagerCommand()
{
NavigationParam parameter = new NavigationParam
{
ViewName = ViewDownloadManagerViewModel.Tag,
ParentViewName = Tag,
Parameter = null
};
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
}
// 左侧tab点击事件 // 左侧tab点击事件
private DelegateCommand<object> leftTabHeadersCommand; private DelegateCommand<object> leftTabHeadersCommand;
public DelegateCommand<object> LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand<object>(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand)); public DelegateCommand<object> LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand<object>(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand));
@ -444,6 +475,11 @@ namespace DownKyi.ViewModels
{ {
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24;
DownloadManage.Width = 24;
DownloadManage.Fill = DictionaryResource.GetColor("ColorPrimary");
TabHeaders.Clear(); TabHeaders.Clear();
Medias.Clear(); Medias.Clear();
SelectTabId = -1; SelectTabId = -1;

@ -200,7 +200,6 @@ namespace DownKyi.ViewModels
eventAggregator.GetEvent<NavigationEvent>().Publish(parameter); eventAggregator.GetEvent<NavigationEvent>().Publish(parameter);
} }
// 左侧tab点击事件 // 左侧tab点击事件
private DelegateCommand<object> tabLeftBannersCommand; private DelegateCommand<object> tabLeftBannersCommand;
public DelegateCommand<object> TabLeftBannersCommand => tabLeftBannersCommand ?? (tabLeftBannersCommand = new DelegateCommand<object>(ExecuteTabLeftBannersCommand)); public DelegateCommand<object> TabLeftBannersCommand => tabLeftBannersCommand ?? (tabLeftBannersCommand = new DelegateCommand<object>(ExecuteTabLeftBannersCommand));

@ -113,9 +113,11 @@ namespace DownKyi.ViewModels
Loading.StartAnimate(); Loading.StartAnimate();
LoadingVisibility = Visibility.Collapsed; LoadingVisibility = Visibility.Collapsed;
// 返回按钮
ArrowBack = NavigationIcon.Instance().ArrowBack; ArrowBack = NavigationIcon.Instance().ArrowBack;
ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark"); ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
// 下载管理按钮
DownloadManage = ButtonIcon.Instance().DownloadManage; DownloadManage = ButtonIcon.Instance().DownloadManage;
DownloadManage.Height = 24; DownloadManage.Height = 24;
DownloadManage.Width = 24; DownloadManage.Width = 24;
@ -753,10 +755,10 @@ namespace DownKyi.ViewModels
{ {
string param = navigationContext.Parameters.GetValue<string>("Parameter"); string param = navigationContext.Parameters.GetValue<string>("Parameter");
// 移除剪贴板id // 移除剪贴板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; return;
} }
@ -764,7 +766,7 @@ namespace DownKyi.ViewModels
// 正在执行任务时不开启新任务 // 正在执行任务时不开启新任务
if (LoadingVisibility != Visibility.Visible) if (LoadingVisibility != Visibility.Visible)
{ {
InputText = intput; InputText = input;
PropertyChangeAsync(ExecuteInputCommand); PropertyChangeAsync(ExecuteInputCommand);
} }
} }

@ -124,8 +124,9 @@
<Grid Grid.Row="0"> <Grid Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="10" /> <ColumnDefinition Width="100" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button <Button
@ -177,6 +178,26 @@
Text="{Binding Title}" /> Text="{Binding Title}" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

@ -226,6 +226,26 @@
</Style> </Style>
</ListBox.Style> </ListBox.Style>
</ListBox> </ListBox>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

@ -192,6 +192,26 @@
Text="{DynamicResource PublicFavorites}" /> Text="{DynamicResource PublicFavorites}" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

@ -235,6 +235,26 @@
Text="{DynamicResource MyHistory}" /> Text="{DynamicResource MyHistory}" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

@ -159,6 +159,26 @@
Text="{DynamicResource MyToView}" /> Text="{DynamicResource MyToView}" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

@ -43,6 +43,26 @@
Text="{DynamicResource PublicFavorites}" /> Text="{DynamicResource PublicFavorites}" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

@ -153,6 +153,26 @@
Text="{DynamicResource Publication}" /> Text="{DynamicResource Publication}" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Grid.Column="2"
Width="24"
Height="24"
Margin="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding DownloadManagerCommand}"
Style="{StaticResource ImageBtnStyle}"
ToolTip="{DynamicResource DownloadManager}">
<ContentControl>
<Path
Width="{Binding DownloadManage.Width}"
Height="{Binding DownloadManage.Height}"
Data="{Binding DownloadManage.Data}"
Fill="{Binding DownloadManage.Fill}"
Stretch="Uniform" />
</ContentControl>
</Button>
</Grid> </Grid>
<TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" /> <TextBlock Grid.Row="1" Background="{DynamicResource BrushBorder}" />

Loading…
Cancel
Save