From bb92237613247acc55f523d041b9e3e01c71c9f1 Mon Sep 17 00:00:00 2001 From: iamboss Date: Tue, 17 Feb 2026 15:42:50 +0800 Subject: [PATCH] fix cubetree init crash. --- Disp/WpfDispUtil.cs | 20 +++++++++++++++++++- Hi.WpfPlus.csproj | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Disp/WpfDispUtil.cs b/Disp/WpfDispUtil.cs index 161ae09..72ca6ef 100644 --- a/Disp/WpfDispUtil.cs +++ b/Disp/WpfDispUtil.cs @@ -14,7 +14,7 @@ namespace Hi.WpfPlus.Disp; /// /// /// Usage pattern: call to queue display content, -/// then call to start the WPF application and show windows. +/// then call to start the WPF application and show windows. /// /// /// Each unique key creates a separate . @@ -38,6 +38,9 @@ public static class WpfDispUtil { DispFrameUtil.UpdateByDispEngineConfigFunc = ApplyConfig; } + /// + /// Initializes the display engine. + /// public static void Init() { DispEngine.Init(); } @@ -60,14 +63,29 @@ public static class WpfDispUtil if (config.SketchView != null) dispEngine.SketchView = config.SketchView; } + /// + /// Configures the display engine with the specified displayees for the given title. + /// + /// The title/key to identify the display window. + /// The displayees to be configured. + /// The display engine configuration. public static DispEngineConfig Call( string title, params IDisplayee[] displayees)=> DispFrameUtil.Call(title, displayees); + /// + /// Configures the display engine with the specified displayees and starts the WPF application. + /// + /// The title/key to identify the display window. + /// The displayees to be configured. public static void RunApplication(string title, params IDisplayee[] displayees) { DispFrameUtil.Call(title, displayees); RunApplication(); } + /// + /// Starts the WPF application and shows all configured windows. + /// Blocks until all windows are closed. + /// public static void RunApplication() { Application app = new Application() diff --git a/Hi.WpfPlus.csproj b/Hi.WpfPlus.csproj index a10eb8e..5be354c 100644 --- a/Hi.WpfPlus.csproj +++ b/Hi.WpfPlus.csproj @@ -12,7 +12,7 @@ HiAPI wpf canvas. Debug;Release - 115 + 118 3.1.$(VersionBuild) Hi.WpfPlus HiAPI