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"> - - + + + + + + + + + + + +