From 1a21507ca207bad6c578928a1079ae5b5a2d843f Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sun, 24 Sep 2023 14:27:32 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=BD=93=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E6=97=B6=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/MainDisplay.cs | 4 +- .../WinDesign/winGameSetting.xaml | 191 ++++++++++++------ 2 files changed, 130 insertions(+), 65 deletions(-) diff --git a/VPet-Simulator.Core/Display/MainDisplay.cs b/VPet-Simulator.Core/Display/MainDisplay.cs index b07a708..08f3251 100644 --- a/VPet-Simulator.Core/Display/MainDisplay.cs +++ b/VPet-Simulator.Core/Display/MainDisplay.cs @@ -449,7 +449,7 @@ namespace VPet_Simulator.Core public void Display(string name, AnimatType animat, GraphType Type, Action EndAction = null) { var list = Core.Graph.FindGraphs(name, animat, Core.Save.Mode)?.FindAll(x => x.GraphInfo.Type == Type); - if (list != null && list.Count > 0) + if ((list?.Count ?? -1) > 0) Display(list[Function.Rnd.Next(list.Count)], () => EndAction(name)); else Display(Type, animat, EndAction); @@ -464,7 +464,7 @@ namespace VPet_Simulator.Core public void Display(string name, AnimatType animat, GraphType Type, Action EndAction = null) { var list = Core.Graph.FindGraphs(name, animat, Core.Save.Mode)?.FindAll(x => x.GraphInfo.Type == Type); - if (list.Count > 0) + if ((list?.Count ?? -1) > 0) Display(list[Function.Rnd.Next(list.Count)], EndAction); else Display(Type, animat, EndAction); diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml index 6f4fec0..49f15c1 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml @@ -6,8 +6,8 @@ xmlns:local="clr-namespace:VPet_Simulator.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" - xmlns:system="clr-namespace:System;assembly=mscorlib" Title="{ll:Str 设置}" Width="{ll:Dbe SettingWidth, - DefValue=500}" Height="550" Closing="WindowX_Closing" FontSize="16" + xmlns:system="clr-namespace:System;assembly=mscorlib" Title="{ll:Str 设置}" + Width="{ll:Dbe SettingWidth, DefValue=500}" Height="550" Closing="WindowX_Closing" FontSize="16" Style="{DynamicResource BaseWindowXStyle}" Topmost="True" WindowStartupLocation="CenterScreen" mc:Ignorable="d"> - - + + + + + + + + + + + +