tune.
This commit is contained in:
parent
c1f3fefdc0
commit
68736b79fb
@ -1,6 +1,7 @@
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using Hi.Disp;
|
||||
using Hi.Geom;
|
||||
using Hi.Licenses;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Windows;
|
||||
|
||||
@ -29,15 +30,17 @@ namespace Hi.WpfPlus.Disp;
|
||||
/// </code>
|
||||
/// </example>
|
||||
/// </remarks>
|
||||
public static class WpfDisp
|
||||
public static class WpfDispUtil
|
||||
{
|
||||
static readonly ConcurrentDictionary<string, RenderingWindow> KeyToWindowDictionary = new();
|
||||
|
||||
static WpfDisp()
|
||||
static WpfDispUtil()
|
||||
{
|
||||
DispFrameUtil.UpdateByDispEngineConfigFunc = ApplyConfig;
|
||||
}
|
||||
public static void Init() { }
|
||||
public static void Init() {
|
||||
DispEngine.Init();
|
||||
}
|
||||
|
||||
static void ApplyConfig(string key, DispEngineConfig config)
|
||||
{
|
||||
@ -57,4 +60,24 @@ public static class WpfDisp
|
||||
if (config.SketchView != null)
|
||||
dispEngine.SketchView = config.SketchView;
|
||||
}
|
||||
public static DispEngineConfig Call(
|
||||
string title, params IDisplayee[] displayees)=>
|
||||
DispFrameUtil.Call(title, displayees);
|
||||
public static void RunApplication(string title, params IDisplayee[] displayees)
|
||||
{
|
||||
DispFrameUtil.Call(title, displayees);
|
||||
RunApplication();
|
||||
}
|
||||
public static void RunApplication()
|
||||
{
|
||||
Application app = new Application()
|
||||
{
|
||||
ShutdownMode = ShutdownMode.OnLastWindowClose
|
||||
};
|
||||
//app.Exit += (o, e) =>
|
||||
//{
|
||||
// License.LogOutAll();
|
||||
//};
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user