using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Templates; using Avalonia.Layout; using Avalonia.Media; using Avalonia.Threading; internal sealed class MainWindow : Window { private readonly TextBox executable = new() { Text = EmulatorCli.DefaultPath(), Watermark = "Emulator 可执行文件路径" }; private readonly TextBox targetName = new() { Watermark = "选择列表中的实例" }; private readonly TextBox name = new() { Watermark = "例如 My Phone" }; private readonly TextBox deviceType = new() { Watermark = "例如 phone", Text = "phone" }; private readonly TextBox version = new() { Watermark = "例如 HarmonyOS 7.0.0(26.0.0)" }; private readonly CheckBox headless = new() { Content = "无窗口启动" }; private readonly ListBox instances = new() { MinHeight = 120 }; private readonly ListBox images = new() { MinHeight = 120 }; private readonly ListBox output = new() { MaxHeight = 156, MinHeight = 104 }; private readonly Button logToggle = new() { Content = "展开命令输出" }; private readonly TextBlock status = new() { Text = "就绪", VerticalAlignment = VerticalAlignment.Center, TextTrimming = TextTrimming.CharacterEllipsis }; private readonly Button cancel = new() { Content = "取消命令", IsVisible = false }; private readonly List