From e37ce15b72f6b1a4db914e2fa4f3ae4ea88cbc77 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Tue, 31 Oct 2023 15:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=A4=9A=E5=BC=80=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 3 +-- VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 8bc67f9..04c97af 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -239,7 +239,7 @@ namespace VPet_Simulator.Windows { Main.ToolBar.MenuDIY.Items.Clear(); - if (App.MutiSaves.Count > 0) + if (App.MutiSaves.Count > 1) { var list = App.MutiSaves.ToList(); foreach (var win in App.MainWindows) @@ -273,7 +273,6 @@ namespace VPet_Simulator.Windows } Main.ToolBar.MenuDIY.Items.Add(menuItem); } - } foreach (Sub sub in Set["diy"]) diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs index 5f2290f..8ae71f4 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs @@ -964,7 +964,7 @@ namespace VPet_Simulator.Windows LBHave.Items.Clear(); foreach (var str in App.MutiSaves) { - var rn = str; + var rn = str.Translate(); if (str == "") rn = "默认存档".Translate(); if (str == mw.PrefixSave.Trim('-')) @@ -1001,13 +1001,14 @@ namespace VPet_Simulator.Windows { MessageBoxX.Show("存档名不能包括特殊符号".Translate()); return; - } + } var lps = new LPS(mw.Set.ToString()); lps.SetInt("savetimes", 0); lps["gameconfig"].SetString("petgraph", savename); File.WriteAllText(ExtensionValue.BaseDirectory + @$"\Setting-{savename}.lps", lps.ToString()); App.MutiSaves.Add(savename); new MainWindow(savename).Show(); + LoadMutiUI(); return; case MessageBoxResult.No: break; @@ -1455,7 +1456,7 @@ namespace VPet_Simulator.Windows { if (LBHave.SelectedIndex == -1) return; - var str = LBHave.SelectedItem as string; + var str = App.MutiSaves[LBHave.SelectedIndex]; if (str == "默认存档".Translate()) { str = string.Empty; @@ -1494,7 +1495,7 @@ namespace VPet_Simulator.Windows { if (LBHave.SelectedIndex == -1) return; - var str = LBHave.SelectedItem as string; + var str = App.MutiSaves[LBHave.SelectedIndex]; if (str == "默认存档".Translate()) { MessageBoxX.Show("默认存档无法删除,请使用重新开始功能重新开始游戏".Translate());