diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index f7d2ef7625..c8780abc0c 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -112,47 +112,47 @@ namespace MaaWpfGui.ViewModels.UI /// /// Gets 游戏设置model /// - public static GameSettingsUserControlModel GameSettings { get; } = GameSettingsUserControlModel.Instance; + public static GameSettingsUserControlModel GameSettings { get; } = new(); /// /// Gets 连接设置model /// - public static ConnectSettingsUserControlModel ConnectSettings { get; } = ConnectSettingsUserControlModel.Instance; + public static ConnectSettingsUserControlModel ConnectSettings { get; } = new(); /// /// Gets 启动设置Model /// - public static StartSettingsUserControlModel StartSettings { get; } = StartSettingsUserControlModel.Instance; + public static StartSettingsUserControlModel StartSettings { get; } = new(); /// /// Gets 界面设置model /// - public static GuiSettingsUserControlModel GuiSettings { get; } = GuiSettingsUserControlModel.Instance; + public static GuiSettingsUserControlModel GuiSettings { get; } = new(); /// /// Gets 定时设置model /// - public static TimerSettingsUserControlModel TimerSettings { get; } = TimerSettingsUserControlModel.Instance; + public static TimerSettingsUserControlModel TimerSettings { get; } = new(); /// /// Gets 远程控制model /// - public static RemoteControlUserControlModel RemoteControlSettings { get; } = RemoteControlUserControlModel.Instance; + public static RemoteControlUserControlModel RemoteControlSettings { get; } = new(); /// /// Gets 软件更新model /// - public static VersionUpdateSettingsUserControlModel VersionUpdateSettings { get; } = VersionUpdateSettingsUserControlModel.Instance; + public static VersionUpdateSettingsUserControlModel VersionUpdateSettings { get; } = new(); /// /// Gets 外部通知model /// - public static ExternalNotificationSettingsUserControlModel ExternalNotificationSettings { get; } = ExternalNotificationSettingsUserControlModel.Instance; + public static ExternalNotificationSettingsUserControlModel ExternalNotificationSettings { get; } = new(); /// /// Gets 性能设置model /// - public static PerformanceUserControlModel PerformanceSettings { get; } = PerformanceUserControlModel.Instance; + public static PerformanceUserControlModel PerformanceSettings { get; } = new(); #endregion 设置界面Model diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/ConnectSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/ConnectSettingsUserControlModel.cs index a956c305c2..7dd75c0f26 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/ConnectSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/ConnectSettingsUserControlModel.cs @@ -28,6 +28,7 @@ using MaaWpfGui.Constants; using MaaWpfGui.Helper; using MaaWpfGui.Main; using MaaWpfGui.States; +using MaaWpfGui.Utilities; using MaaWpfGui.Utilities.ValueType; using MaaWpfGui.ViewModels.UI; using MaaWpfGui.WineCompat; @@ -45,8 +46,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; /// public class ConnectSettingsUserControlModel : PropertyChangedBase { - public static ConnectSettingsUserControlModel Instance { get; } = new(); - private static readonly ILogger _logger = Log.ForContext(); private static RunningState _runningState => RunningState.Instance; diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/ExternalNotificationSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/ExternalNotificationSettingsUserControlModel.cs index 413fb1ee75..d51b07f762 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/ExternalNotificationSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/ExternalNotificationSettingsUserControlModel.cs @@ -27,8 +27,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; /// public class ExternalNotificationSettingsUserControlModel : PropertyChangedBase { - public static ExternalNotificationSettingsUserControlModel Instance { get; } = new(); - // UI 绑定的方法 // ReSharper disable once UnusedMember.Global public static void ExternalNotificationSendTest() diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs index 5f55f29ea4..cdf9a2d504 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs @@ -27,8 +27,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; public class GameSettingsUserControlModel : PropertyChangedBase { - public static GameSettingsUserControlModel Instance { get; } = new(); - private static readonly ILogger _logger = Log.ForContext(); private static VersionUpdateSettingsUserControlModel VersionUpdateSettings => SettingsViewModel.VersionUpdateSettings; diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/GuiSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/GuiSettingsUserControlModel.cs index c3c4db53fd..52d916b541 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/GuiSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/GuiSettingsUserControlModel.cs @@ -29,8 +29,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; public class GuiSettingsUserControlModel : PropertyChangedBase { - public static GuiSettingsUserControlModel Instance { get; } = new(); - /// /// Gets or sets the language list. /// diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs index 9779542628..b0a67a7653 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs @@ -23,8 +23,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; /// public class RemoteControlUserControlModel : PropertyChangedBase { - public static RemoteControlUserControlModel Instance { get; } = new(); - private string _remoteControlGetTaskEndpointUri = ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlGetTaskEndpointUri, string.Empty); public string RemoteControlGetTaskEndpointUri diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/StartSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/StartSettingsUserControlModel.cs index ed0ecc02a3..4716cea323 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/StartSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/StartSettingsUserControlModel.cs @@ -40,8 +40,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; /// public class StartSettingsUserControlModel : PropertyChangedBase { - public static StartSettingsUserControlModel Instance { get; } = new(); - private static readonly ILogger _logger = Log.ForContext(); private static RunningState _runningState => RunningState.Instance; diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/TimerSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/TimerSettingsUserControlModel.cs index 40a353bc4b..2d5b63f7cd 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/TimerSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/TimerSettingsUserControlModel.cs @@ -24,8 +24,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; /// public class TimerSettingsUserControlModel : PropertyChangedBase { - public static TimerSettingsUserControlModel Instance { get; } = new(); - private bool _forceScheduledStart = Convert.ToBoolean(ConfigurationHelper.GetGlobalValue(ConfigurationKeys.ForceScheduledStart, bool.FalseString)); /// diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs index d2d75577f9..0ab5d19805 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs @@ -41,8 +41,6 @@ namespace MaaWpfGui.ViewModels.UserControl.Settings; /// public class VersionUpdateSettingsUserControlModel : PropertyChangedBase { - public static VersionUpdateSettingsUserControlModel Instance { get; } = new(); - public enum UpdateVersionType { /// diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/PerformanceUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/PerformanceUserControlModel.cs similarity index 92% rename from src/MaaWpfGui/ViewModels/UserControl/Settings/PerformanceUserControlModel.cs rename to src/MaaWpfGui/ViewModels/UserControl/TaskQueue/PerformanceUserControlModel.cs index 3782245573..3396976eed 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/PerformanceUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/PerformanceUserControlModel.cs @@ -17,15 +17,13 @@ using MaaWpfGui.Helper; using MaaWpfGui.ViewModels.UI; using Stylet; -namespace MaaWpfGui.ViewModels.UserControl.Settings; +namespace MaaWpfGui.ViewModels.UserControl.TaskQueue; /// /// 性能设置 /// public class PerformanceUserControlModel : PropertyChangedBase { - public static PerformanceUserControlModel Instance { get; } = new(); - public List GpuOptions => GpuOption.GetGpuOptions(); public GpuOption ActiveGpuOption