From 70c7e02784a255c10de19ce7daeb6982f9d2ee76 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sun, 13 Aug 2023 20:23:17 +1000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug=E5=92=8C=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.xaml.cs | 25 ++++++++++++------- VPet-Simulator.Windows/PetHelper.xaml.cs | 16 ++++++++---- .../WinDesign/winBetterBuy.xaml.cs | 2 +- .../WinDesign/winGameSetting.xaml | 8 +++--- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 42b124a..36ae947 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -231,19 +231,26 @@ namespace VPet_Simulator.Windows LocalizeCore.LoadCulture(Set.Language); //旧版本设置兼容 - var cgpteb = Set["CGPT"].Find("enable"); - if (cgpteb != null) + var cgpte = Set.FindLine("CGPT"); + if (cgpte != null) { - if (Set["CGPT"][(gbol)"enable"]) + var cgpteb = cgpte.Find("enable"); + if (cgpteb != null) { - Set["CGPT"][(gstr)"type"] = "API"; + if (Set["CGPT"][(gbol)"enable"]) + { + Set["CGPT"][(gstr)"type"] = "API"; + } + else + { + Set["CGPT"][(gstr)"type"] = "LB"; + } + Set["CGPT"].Remove(cgpteb); } - else - { - Set["CGPT"][(gstr)"type"] = "LB"; - } - Set["CGPT"].Remove(cgpteb); } + else//新玩家,默认设置为 + Set["CGPT"][(gstr)"type"] = "LB"; + if (Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\UserData") && !Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\BackUP")) { Directory.Move(AppDomain.CurrentDomain.BaseDirectory + @"\UserData", AppDomain.CurrentDomain.BaseDirectory + @"\BackUP"); diff --git a/VPet-Simulator.Windows/PetHelper.xaml.cs b/VPet-Simulator.Windows/PetHelper.xaml.cs index ee0e688..359345f 100644 --- a/VPet-Simulator.Windows/PetHelper.xaml.cs +++ b/VPet-Simulator.Windows/PetHelper.xaml.cs @@ -66,11 +66,17 @@ namespace VPet_Simulator.Windows Dispatcher.Invoke(() => { if (isclick) - { - isdragmove = Opacity == 0.8; - Cursor = Cursors.Hand; - Opacity = 1; - DragMove(); + { + try + { + DragMove(); + isdragmove = Opacity == 0.8; + Cursor = Cursors.Hand; + Opacity = 1; + } + catch { + } + } }); }); diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs index 1be4c11..3e16506 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs @@ -246,8 +246,8 @@ namespace VPet_Simulator.Windows var b = mw.Main.FindDisplayBorder(ig); ig.Run(b, item.ImageSource, () => { - mw.Main.EventTimer_Elapsed(); mw.Main.DisplayToNomal(); + mw.Main.EventTimer_Elapsed(); }); } } diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml index e5eee75..61f8e5e 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml @@ -31,7 +31,7 @@ - + @@ -135,7 +135,7 @@ Background="{x:Null}" Grid.Row="1" ToolTip="{ll:Str '桌宠图形渲染的分辨率,越高图形越清晰\ 但是高分辨率会占用更多内存\ 重启后生效'}" /> - + - + + +