fix cubetree init crash.
This commit is contained in:
@@ -157,40 +157,39 @@ using Hi.Licenses;
|
||||
using Hi.WpfPlus.Disp;
|
||||
using System.Windows;
|
||||
|
||||
namespace Sample.Disp
|
||||
namespace Sample.Disp;
|
||||
|
||||
/// <summary>
|
||||
/// Provides utility functions for running HiAPI display examples in a WPF environment.
|
||||
/// Contains helper methods that simplify the setup and execution of WPF applications with HiAPI rendering.
|
||||
/// Handles common initialization and cleanup tasks for visualization examples.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)]
|
||||
/// </remarks>
|
||||
public static class DemoUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides utility functions for running HiAPI display examples in a WPF environment.
|
||||
/// Contains helper methods that simplify the setup and execution of WPF applications with HiAPI rendering.
|
||||
/// Handles common initialization and cleanup tasks for visualization examples.
|
||||
/// Creates and runs a WPF application with a RenderingWindow to display 3D content.
|
||||
/// Handles proper initialization and cleanup of HiAPI resources including MongoDB server,
|
||||
/// display engine, and licensing.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)]
|
||||
/// </remarks>
|
||||
public static class DemoUtil
|
||||
/// <param name="title">The title for the application window</param>
|
||||
/// <param name="displayee">The object that implements IDisplayee to be rendered</param>
|
||||
public static void RunApplication(string title, IDisplayee displayee)
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates and runs a WPF application with a RenderingWindow to display 3D content.
|
||||
/// Handles proper initialization and cleanup of HiAPI resources including MongoDB server,
|
||||
/// display engine, and licensing.
|
||||
/// </summary>
|
||||
/// <param name="title">The title for the application window</param>
|
||||
/// <param name="displayee">The object that implements IDisplayee to be rendered</param>
|
||||
public static void RunApplication(string title, IDisplayee displayee)
|
||||
LocalApp.AppBegin();
|
||||
Application app = new Application();
|
||||
app.Exit += (o, e) =>
|
||||
{
|
||||
LocalApp.AppBegin();
|
||||
Application app = new Application();
|
||||
app.Exit += (o, e) =>
|
||||
{
|
||||
LocalApp.AppEnd();
|
||||
};
|
||||
app.Run(new RenderingWindow()
|
||||
{
|
||||
Title = title,
|
||||
Displayee = displayee
|
||||
});
|
||||
}
|
||||
LocalApp.AppEnd();
|
||||
};
|
||||
app.Run(new RenderingWindow()
|
||||
{
|
||||
Title = title,
|
||||
Displayee = displayee
|
||||
});
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
|
||||
Reference in New Issue
Block a user