add docfx samples.
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user