mirror of
https://github.com/yaobiao131/downkyicore.git
synced 2025-08-10 00:52:31 +00:00
fix: 修复全选无效的问题 Fixed: #11
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using DownKyi.Core.BiliApi.BiliUtils;
|
||||
using DownKyi.Core.BiliApi.VideoStream;
|
||||
using DownKyi.Core.Logging;
|
||||
@@ -416,6 +417,33 @@ public class ViewVideoDetailViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
// 全选事件
|
||||
private DelegateCommand<object>? _selectAllCommand;
|
||||
public DelegateCommand<object> SelectAllCommand => _selectAllCommand ??= new DelegateCommand<object>(ExecuteSelectAllCommand);
|
||||
|
||||
/// <summary>
|
||||
/// 全选事件
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
private void ExecuteSelectAllCommand(object parameter)
|
||||
{
|
||||
if (parameter is not DataGrid dataGrid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsSelectAll)
|
||||
{
|
||||
dataGrid.SelectAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
dataGrid.SelectedIndex = -1;
|
||||
selectedVideoPages.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 解析视频流事件
|
||||
private DelegateCommand<object>? _parseCommand;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user