using Avalonia; using Avalonia.Controls; 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 name = new() { Watermark = "实例名称", Width = 210 }; private readonly TextBox deviceType = new() { Watermark = "设备类型,如 phone", Width = 170, Text = "phone" }; private readonly TextBox version = new() { Watermark = "HarmonyOS 镜像版本", Width = 270 }; 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(); private readonly TextBlock status = new() { Text = "就绪", VerticalAlignment = VerticalAlignment.Center }; private readonly Button cancel = new() { Content = "取消命令", IsEnabled = false }; private readonly List