2024-11-15 14:49:29 +08:00
|
|
|
|
using Avalonia.Interactivity;
|
2024-11-14 17:11:43 +08:00
|
|
|
|
using Avalonia.Markup.Xaml;
|
2024-11-13 17:09:15 +08:00
|
|
|
|
using Avalonia.ReactiveUI;
|
2024-11-14 17:11:43 +08:00
|
|
|
|
using detect.gui.Commons;
|
2024-11-13 17:09:15 +08:00
|
|
|
|
using detect.gui.ViewModels;
|
|
|
|
|
using ReactiveUI;
|
|
|
|
|
|
|
|
|
|
namespace detect.gui.Views;
|
|
|
|
|
|
|
|
|
|
public partial class DeviceView : ReactiveUserControl<DeviceViewModel>
|
|
|
|
|
{
|
|
|
|
|
public DeviceView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
this.WhenActivated(d => { });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void InitializeComponent()
|
|
|
|
|
{
|
|
|
|
|
AvaloniaXamlLoader.Load(this);
|
|
|
|
|
}
|
2024-11-14 17:11:43 +08:00
|
|
|
|
|
|
|
|
|
private void OnLoaded(object? sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// this.GetParent<MainView>()!.WebWindow.ParentContent = this;
|
|
|
|
|
this.GetParent<MainView>()!.WebWindow.SetAddress(1);
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// private void OnUnloaded(object? sender, RoutedEventArgs e)
|
|
|
|
|
// {
|
|
|
|
|
// this.GetParent<MainView>()!.WebWindow.Hide();
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// private void OnSizeChanged(object? sender, SizeChangedEventArgs e)
|
|
|
|
|
// {
|
|
|
|
|
// if (!this.GetParent<MainView>()!.WebWindow.IsVisible) return;
|
|
|
|
|
// this.GetParent<MainView>()!.WebWindow.InitUI();
|
|
|
|
|
// }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
}
|