From f1908e36039d7fe0a7a94de362ae95e04cdfa329 Mon Sep 17 00:00:00 2001 From: HeBianGu <908293466@qq.com> Date: Wed, 31 Jan 2024 19:24:54 +0800 Subject: [PATCH] bug+ --- Source/Controls/H.Controls.Form/Form.xaml.cs | 4 +++ .../H.Modules.About/AboutViewPresenter.xaml | 20 +++++++++------ Source/Providers/H.Providers.Ioc/Ioc/DbIoc.cs | 8 +++--- Source/Windows/H.Windows.Main/MainWindow.xaml | 25 +++++++++++-------- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/Source/Controls/H.Controls.Form/Form.xaml.cs b/Source/Controls/H.Controls.Form/Form.xaml.cs index 8afdf5b3..4ef11128 100644 --- a/Source/Controls/H.Controls.Form/Form.xaml.cs +++ b/Source/Controls/H.Controls.Form/Form.xaml.cs @@ -1310,6 +1310,10 @@ protected void RefreshObjectinternal() public class StaticForm : Form { + static StaticForm() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(StaticForm), new FrameworkPropertyMetadata(typeof(StaticForm))); + } public override void RefreshObject() { this.RefreshObjectinternal(); diff --git a/Source/Modules/H.Modules.About/AboutViewPresenter.xaml b/Source/Modules/H.Modules.About/AboutViewPresenter.xaml index 91c82103..bc1bbf94 100644 --- a/Source/Modules/H.Modules.About/AboutViewPresenter.xaml +++ b/Source/Modules/H.Modules.About/AboutViewPresenter.xaml @@ -5,17 +5,19 @@ + UseBoolen="False" + UseEnum="False" + UseNull="False" + UsePropertyView="True" /> - + - + @@ -29,10 +31,12 @@ M249.015232 843.178592c35.2 28.8 73.6 51.2 112 67.2 41.6-38.4 96-60.8 150.4-60.8 57.6 0 108.8 22.4 150.4 60.8 41.6-16 80-38.4 112-67.2-12.8-54.4-3.2-112 22.4-163.2 28.8-48 73.6-86.4 128-102.4 3.2-22.4 6.4-44.8 6.4-67.2 0-22.4-3.2-44.8-6.4-67.2-54.4-16-99.2-54.4-128-102.4-28.8-48-35.2-108.8-22.4-163.2-35.2-28.8-73.6-51.2-112-67.2-41.6 38.4-92.8 60.8-150.4 60.8-54.4 0-108.8-22.4-150.4-60.8-41.6 16-80 38.4-112 67.2 12.8 54.4 3.2 112-22.4 163.2-28.8 48-73.6 86.4-128 102.4-3.2 22.4-6.4 44.8-6.4 67.2 0 22.4 3.2 44.8 6.4 67.2 54.4 16 99.2 54.4 128 102.4C252.215232 731.178592 261.815232 788.778592 249.015232 843.178592M361.015232 958.378592c-54.4-19.2-105.6-48-150.4-89.6-6.4-6.4-9.6-16-6.4-22.4 16-48 9.6-99.2-16-140.8-25.6-44.8-64-73.6-112-83.2-9.6-3.2-16-9.6-16-19.2-6.4-28.8-9.6-60.8-9.6-89.6 0-28.8 3.2-57.6 9.6-89.6 3.2-9.6 9.6-16 16-19.2 48-12.8 89.6-41.6 112-83.2 25.6-44.8 28.8-92.8 16-140.8-3.2-9.6 0-19.2 6.4-22.4 44.8-38.4 96-67.2 150.4-89.6 9.6-3.2 16 0 22.4 6.4 35.2 35.2 80 57.6 128 57.6 48 0 96-19.2 128-57.6 6.4-6.4 16-9.6 22.4-6.4 54.4 19.2 105.6 48 150.4 89.6 6.4 6.4 9.6 16 6.4 22.4-16 48-9.6 99.2 16 140.8 25.6 44.8 64 73.6 112 83.2 9.6 3.2 16 9.6 16 19.2 6.4 28.8 9.6 60.8 9.6 89.6 0 28.8-3.2 57.6-9.6 89.6-3.2 9.6-9.6 16-16 19.2-48 12.8-89.6 41.6-112 83.2-25.6 44.8-28.8 92.8-16 140.8 3.2 9.6 0 19.2-6.4 22.4-44.8 38.4-96 67.2-150.4 89.6-9.6 3.2-16 0-22.4-6.4-35.2-35.2-80-57.6-128-57.6-48 0-96 19.2-128 57.6-3.2 3.2-9.6 6.4-16 6.4C364.215232 958.378592 361.015232 958.378592 361.015232 958.378592z - + - + diff --git a/Source/Providers/H.Providers.Ioc/Ioc/DbIoc.cs b/Source/Providers/H.Providers.Ioc/Ioc/DbIoc.cs index 0d4c96b9..cc2b5765 100644 --- a/Source/Providers/H.Providers.Ioc/Ioc/DbIoc.cs +++ b/Source/Providers/H.Providers.Ioc/Ioc/DbIoc.cs @@ -22,12 +22,12 @@ public static void Rebuild() public static T GetService(bool throwIfNone = true) { - T r = (T)_services.GetService(typeof(T)); + T r = (T)_services?.GetService(typeof(T)); if (r == null && throwIfNone) { - System.Ioc.GetService(throwIfNone); - System.Diagnostics.Debug.WriteLine(typeof(T)); - throw new ArgumentNullException($"请先注册<{typeof(T)}>接口"); + return System.Ioc.GetService(throwIfNone); + //System.Diagnostics.Debug.WriteLine(typeof(T)); + //throw new ArgumentNullException($"请先注册<{typeof(T)}>接口"); } return r; } diff --git a/Source/Windows/H.Windows.Main/MainWindow.xaml b/Source/Windows/H.Windows.Main/MainWindow.xaml index cdb5c5cc..272f9403 100644 --- a/Source/Windows/H.Windows.Main/MainWindow.xaml +++ b/Source/Windows/H.Windows.Main/MainWindow.xaml @@ -4,8 +4,8 @@ xmlns:local="clr-namespace:H.Windows.Main"> - --> + @@ -94,10 +96,12 @@ - + - + - +