diff --git a/OngekiFumenEditor/Kernel/SettingPages/Program/ViewModels/ProgramSettingViewModel.cs b/OngekiFumenEditor/Kernel/SettingPages/Program/ViewModels/ProgramSettingViewModel.cs
index 1d0559b3..d2203035 100644
--- a/OngekiFumenEditor/Kernel/SettingPages/Program/ViewModels/ProgramSettingViewModel.cs
+++ b/OngekiFumenEditor/Kernel/SettingPages/Program/ViewModels/ProgramSettingViewModel.cs
@@ -6,7 +6,9 @@
using OngekiFumenEditor.Utils;
using System;
using System.ComponentModel.Composition;
+using System.Configuration;
using System.IO;
+using System.Linq;
using System.Reflection;
using System.Text.Json;
using System.Threading;
@@ -193,6 +195,29 @@ public async void RegisterNyagekiAssociations()
NotifyOfPropertyChange(() => EnableAssociate);
}
+ public void ResetAllSettings()
+ {
+ if (MessageBox.Show(Resources.ResetAllSettingComfirm, Resources.Warning, MessageBoxButtons.YesNo) != DialogResult.Yes)
+ return;
+
+ var settingList = new ApplicationSettingsBase[] {
+ Properties.AudioPlayerToolViewerSetting.Default,
+ Properties.AudioSetting.Default,
+ Properties.EditorGlobalSetting.Default,
+ Properties.LogSetting.Default,
+ Properties.OptionGeneratorToolsSetting.Default,
+ Properties.ProgramSetting.Default,
+ };
+
+ foreach (var setting in settingList)
+ {
+ setting.Reset();
+ setting.Save();
+ }
+
+ MessageBox.Show(Resources.ResetCompleted);
+ }
+
public void UnRegisterNyagekiAssociations()
{
try
diff --git a/OngekiFumenEditor/Kernel/SettingPages/Program/Views/ProgramSettingView.xaml b/OngekiFumenEditor/Kernel/SettingPages/Program/Views/ProgramSettingView.xaml
index 974dec37..687aea48 100644
--- a/OngekiFumenEditor/Kernel/SettingPages/Program/Views/ProgramSettingView.xaml
+++ b/OngekiFumenEditor/Kernel/SettingPages/Program/Views/ProgramSettingView.xaml
@@ -11,7 +11,7 @@
d:Background="White"
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True,
Type=vm:ProgramSettingViewModel}"
- d:DesignHeight="450"
+ d:DesignHeight="800"
d:DesignWidth="800"
mc:Ignorable="d">
@@ -128,5 +128,16 @@
+
+
+
+
+
+
+
diff --git a/OngekiFumenEditor/Properties/Resources.Designer.cs b/OngekiFumenEditor/Properties/Resources.Designer.cs
index 062b5991..1c192fac 100644
--- a/OngekiFumenEditor/Properties/Resources.Designer.cs
+++ b/OngekiFumenEditor/Properties/Resources.Designer.cs
@@ -3399,6 +3399,33 @@ public static string RescueFolderPathSaveTo {
}
}
+ ///
+ /// 查找类似 Do you want to reset all settings for application? 的本地化字符串。
+ ///
+ public static string ResetAllSettingComfirm {
+ get {
+ return ResourceManager.GetString("ResetAllSettingComfirm", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Reset All Settings 的本地化字符串。
+ ///
+ public static string ResetAllSettings {
+ get {
+ return ResourceManager.GetString("ResetAllSettings", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Reset operation completed 的本地化字符串。
+ ///
+ public static string ResetCompleted {
+ get {
+ return ResourceManager.GetString("ResetCompleted", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Reset default 的本地化字符串。
///
@@ -4245,6 +4272,15 @@ public static string WallConflict3 {
}
}
+ ///
+ /// 查找类似 Warning 的本地化字符串。
+ ///
+ public static string Warning {
+ get {
+ return ResourceManager.GetString("Warning", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Some sound file failed to load. Please check the logs for details 的本地化字符串。
///
diff --git a/OngekiFumenEditor/Properties/Resources.ja.resx b/OngekiFumenEditor/Properties/Resources.ja.resx
index fb8bd782..eda75f85 100644
--- a/OngekiFumenEditor/Properties/Resources.ja.resx
+++ b/OngekiFumenEditor/Properties/Resources.ja.resx
@@ -1527,4 +1527,16 @@
レイアウトファイルの読み込みに失敗しました
+
+ すべてのオプションをリセットします
+
+
+ リセット操作が完了しました
+
+
+ 警告
+
+
+ このアプリケーションのすべての構成オプションをリセットしますか?
+
\ No newline at end of file
diff --git a/OngekiFumenEditor/Properties/Resources.resx b/OngekiFumenEditor/Properties/Resources.resx
index b93fef46..586c78da 100644
--- a/OngekiFumenEditor/Properties/Resources.resx
+++ b/OngekiFumenEditor/Properties/Resources.resx
@@ -1536,4 +1536,16 @@
Failed to load layout file
+
+ Reset All Settings
+
+
+ Reset operation completed
+
+
+ Warning
+
+
+ Do you want to reset all settings for application?
+
\ No newline at end of file
diff --git a/OngekiFumenEditor/Properties/Resources.zh-Hans.resx b/OngekiFumenEditor/Properties/Resources.zh-Hans.resx
index f4af0c89..d6fccf76 100644
--- a/OngekiFumenEditor/Properties/Resources.zh-Hans.resx
+++ b/OngekiFumenEditor/Properties/Resources.zh-Hans.resx
@@ -1536,4 +1536,16 @@
加载布局文件失败
+
+ 重置所有选项
+
+
+ 重置已完成
+
+
+ 警告
+
+
+ 是否重置本应用所有配置选项?
+
\ No newline at end of file