This commit is contained in:
熊玮 2024-11-15 15:01:03 +08:00
parent c0ad2ca12a
commit e3e26b2b6c

View File

@ -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;
@ -26,8 +27,11 @@ public partial class WebBrowserWindow : Window
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>(); var service = Locator.Current.GetService<DeviceClientService>();
if (WebView != null) if (WebView != null)
{ {
@ -37,8 +41,6 @@ public partial class WebBrowserWindow : Window
{ {
Log.Warning("WebView is null!"); Log.Warning("WebView is null!");
} }
};
} }
private void InitializeComponent() private void InitializeComponent()