From 2ccdff96a8e981efa85e6aae6d5ceb7c62cc2eec Mon Sep 17 00:00:00 2001
From: croire <1432593898@qq.com>
Date: Wed, 22 Dec 2021 22:09:55 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=91=BD=E5=90=8D=E6=A0=BC?=
=?UTF-8?q?=E5=BC=8F=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0=E6=81=A2=E5=A4=8D?=
=?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DownKyi/Languages/Default.xaml | 1 +
.../ViewModels/Settings/ViewVideoViewModel.cs | 21 +++++++++++++++++++
DownKyi/Views/Settings/ViewVideo.xaml | 13 ++++++++++++
3 files changed, 35 insertions(+)
diff --git a/DownKyi/Languages/Default.xaml b/DownKyi/Languages/Default.xaml
index e3f29bb..9be0a8b 100644
--- a/DownKyi/Languages/Default.xaml
+++ b/DownKyi/Languages/Default.xaml
@@ -136,6 +136,7 @@
画质
视频编码
空格
+ 恢复默认
弹幕
按类型屏蔽
diff --git a/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs b/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs
index 5f47ece..6391106 100644
--- a/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs
+++ b/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs
@@ -307,6 +307,27 @@ namespace DownKyi.ViewModels.Settings
SelectedOptionalField = -1;
}
+ // 重置选中文件名字段
+ private DelegateCommand resetCommand;
+ public DelegateCommand ResetCommand => resetCommand ?? (resetCommand = new DelegateCommand(ExecuteResetCommand));
+
+ ///
+ /// 重置选中文件名字段
+ ///
+ private void ExecuteResetCommand()
+ {
+ bool isSucceed = SettingsManager.GetInstance().SetFileNameParts(null);
+ PublishTip(isSucceed);
+
+ List fileNameParts = SettingsManager.GetInstance().GetFileNameParts();
+ SelectedFileName.Clear();
+ foreach (FileNamePart item in fileNameParts)
+ {
+ string display = DisplayFileNamePart(item);
+ SelectedFileName.Add(new DisplayFileNamePart { Id = item, Title = display });
+ }
+ }
+
#endregion
diff --git a/DownKyi/Views/Settings/ViewVideo.xaml b/DownKyi/Views/Settings/ViewVideo.xaml
index eba06b7..1938bfd 100644
--- a/DownKyi/Views/Settings/ViewVideo.xaml
+++ b/DownKyi/Views/Settings/ViewVideo.xaml
@@ -144,6 +144,7 @@
+
@@ -194,6 +195,18 @@
+
+