From eb3fba97d037ac6942a4858cbe2e23ac96c1fe5c Mon Sep 17 00:00:00 2001 From: Hakoyu Date: Sun, 18 Feb 2024 17:37:16 +0800 Subject: [PATCH] =?UTF-8?q?#=20VPet.Solution=20##=20=E4=BF=AE=E5=A4=8D=20-?= =?UTF-8?q?=20`=E8=AE=BE=E7=BD=AE=E7=BC=96=E8=BE=91=E5=99=A8-mod=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE-=E6=B8=85=E9=99=A4=E5=A4=B1=E6=95=88=E6=A8=A1?= =?UTF-8?q?=E7=BB=84`=E5=8D=A1=E6=AD=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet.Solution/VPet.Solution.csproj | 1 - .../ViewModels/SettingEditor/ModSettingModelModel.cs | 5 ----- VPet.Solution/ViewModels/SettingEditor/ModSettingPageVM.cs | 6 +++--- VPet.Solution/ViewModels/SettingEditor/SettingWindowVM.cs | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 VPet.Solution/ViewModels/SettingEditor/ModSettingModelModel.cs diff --git a/VPet.Solution/VPet.Solution.csproj b/VPet.Solution/VPet.Solution.csproj index d9926cc..450f342 100644 --- a/VPet.Solution/VPet.Solution.csproj +++ b/VPet.Solution/VPet.Solution.csproj @@ -117,7 +117,6 @@ - diff --git a/VPet.Solution/ViewModels/SettingEditor/ModSettingModelModel.cs b/VPet.Solution/ViewModels/SettingEditor/ModSettingModelModel.cs deleted file mode 100644 index 709f687..0000000 --- a/VPet.Solution/ViewModels/SettingEditor/ModSettingModelModel.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace VPet.Solution.ViewModels.SettingEditor; - -internal class ModSettingModelModel -{ -} \ No newline at end of file diff --git a/VPet.Solution/ViewModels/SettingEditor/ModSettingPageVM.cs b/VPet.Solution/ViewModels/SettingEditor/ModSettingPageVM.cs index 5a9cb4d..8d8af74 100644 --- a/VPet.Solution/ViewModels/SettingEditor/ModSettingPageVM.cs +++ b/VPet.Solution/ViewModels/SettingEditor/ModSettingPageVM.cs @@ -120,10 +120,10 @@ public class ModSettingPageVM : ObservableClass is not MessageBoxResult.Yes ) return; - foreach (var mod in ModSetting.Mods.AsEnumerable()) + for (var i = 0; i < ModSetting.Mods.Count; i++) { - if (mod.IsEnabled is null) - ModSetting.Mods.Remove(mod); + if (ModSetting.Mods[i].IsEnabled is null) + ModSetting.Mods.RemoveAt(i); } SearchMod = string.Empty; } diff --git a/VPet.Solution/ViewModels/SettingEditor/SettingWindowVM.cs b/VPet.Solution/ViewModels/SettingEditor/SettingWindowVM.cs index b83d178..a850ed3 100644 --- a/VPet.Solution/ViewModels/SettingEditor/SettingWindowVM.cs +++ b/VPet.Solution/ViewModels/SettingEditor/SettingWindowVM.cs @@ -1,7 +1,7 @@ using HKW.HKWUtils.Observable; using LinePutScript; using LinePutScript.Localization.WPF; -using Panuon.WPF.UI; +using Panuon.WPF; using System; using System.Collections.Generic; using System.Collections.ObjectModel;