public EM05SpawnVehicleView() { InitializeComponent(); Task.Run(() => { var windowData = Memory.GetGameWindowData(); this.Dispatcher.Invoke(() => { TextBlock_ScreenResolution.Text = $"屏幕分辨率 {SystemParameters.PrimaryScreenWidth} x {SystemParameters.PrimaryScreenHeight}"; TextBlock_GameResolution.Text = $"游戏分辨率 {windowData.Width} x {windowData.Height}"; TextBlock_ScreenScale.Text = $"缩放比例 {ScreenHelper.GetScalingRatio()}"; }); }); // 载具列表 for (int i = 0; i < VehicleData.VehicleClassData.Count; i++) { ListBox_VehicleClass.Items.Add(VehicleData.VehicleClassData[i].ClassName); } ListBox_VehicleClass.SelectedIndex = 0; ExternalMenuWindow.ClosingDisposeEvent += ExternalMenuView_ClosingDisposeEvent; }