From 8e056b097f5e67528194e44cd59f9e37c587f21c Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 1 Apr 2024 00:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=BC=E5=AE=B9=E8=8C=83?= =?UTF-8?q?=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WinDesign/winGameSetting.xaml.cs | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs index b1806c4..d0adc82 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs @@ -357,7 +357,7 @@ namespace VPet_Simulator.Windows runMODAuthor.Text = mod.Author; runMODGameVer.Text = CoreMOD.INTtoVER(mod.GameVer); runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText); - if(ImageMOD.Source is BitmapImage bitmapImage) + if (ImageMOD.Source is BitmapImage bitmapImage) { bitmapImage.StreamSource?.Dispose(); } @@ -379,31 +379,32 @@ namespace VPet_Simulator.Windows } else ImageMOD.Source = ImageResources.NewSafeBitmapImage(@"pack://application:,,,/Res/TopLogo2019.PNG"); - if (mod.GameVer < mw.version) - { - if (mod.GameVer / 1000 == mw.version / 1000) + if (mod.GameVer / 100 != mw.version / 100) + if (mod.GameVer < mw.version) { - runMODGameVer.Text += " (兼容)".Translate(); + if (mod.GameVer / 1000 == mw.version / 1000) + { + runMODGameVer.Text += " (兼容)".Translate(); + } + else + { + runMODGameVer.Text += " (版本低)".Translate(); + runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0)); + } } - else + else if (mod.GameVer > mw.version) { - runMODGameVer.Text += " (版本低)".Translate(); - runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0)); + if (mod.GameVer / 1000 == mw.version / 1000) + { + runMODGameVer.Text += " (兼容)".Translate(); + runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText); + } + else + { + runMODGameVer.Text += " (版本高)".Translate(); + runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0)); + } } - } - else if (mod.GameVer > mw.version) - { - if (mod.GameVer / 1000 == mw.version / 1000) - { - runMODGameVer.Text += " (兼容)".Translate(); - runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText); - } - else - { - runMODGameVer.Text += " (版本高)".Translate(); - runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0)); - } - } if (!mod.IsOnMOD(mw)) { LabelModName.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));