using Hi.Disp; using Hi.Licenses; using Hi.MongoUtils; using Hi.Wpf.Disp; using System.Windows; namespace Sample.Disp { /// /// ### Source Code /// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)] /// 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 }); } } }