mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
fix
This commit is contained in:
parent
c0ad2ca12a
commit
e3e26b2b6c
@ -1,4 +1,5 @@
|
|||||||
using Avalonia.Controls;
|
using System;
|
||||||
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.Platform;
|
using Avalonia.Platform;
|
||||||
using detect.gui.Services;
|
using detect.gui.Services;
|
||||||
@ -25,20 +26,21 @@ public partial class WebBrowserWindow : Window
|
|||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
Topmost = true;
|
Topmost = true;
|
||||||
CanResize = false;
|
CanResize = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Opened += (sender, args) =>
|
protected override void OnOpened(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnOpened(e);
|
||||||
|
var service = Locator.Current.GetService<DeviceClientService>();
|
||||||
|
if (WebView != null)
|
||||||
{
|
{
|
||||||
var service = Locator.Current.GetService<DeviceClientService>();
|
WebView.RegisterJavascriptObject("DeviceClientService", service);
|
||||||
if (WebView != null)
|
}
|
||||||
{
|
else
|
||||||
WebView.RegisterJavascriptObject("DeviceClientService", service);
|
{
|
||||||
}
|
Log.Warning("WebView is null!");
|
||||||
else
|
}
|
||||||
{
|
|
||||||
Log.Warning("WebView is null!");
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
|
Loading…
Reference in New Issue
Block a user