add docfx samples.

This commit is contained in:
2025-04-13 00:19:09 +08:00
parent d63cb0e141
commit 9246bd6c41
13 changed files with 652 additions and 11 deletions
+32
View File
@@ -0,0 +1,32 @@
using Hi.Disp;
using Hi.Licenses;
using Hi.MongoUtils;
using Hi.Wpf.Disp;
using System.Windows;
namespace Sample.Disp
{
/// <remarks>
/// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)]
/// </remarks>
public static class DemoUtil
{
public static void RunApplication(string title, IDisplayee displayee)
{
Application app = new Application();
app.Exit += (o, e) =>
{
if(MongoServer.IsDefaultInit)
MongoServer.Default.Dispose();
DispEngine.FinishDisp();
License.LogOutAll();
};
app.Run(new RenderingWindow()
{
Title = title,
Displayee = displayee
});
}
}
}