弹窗优化

This commit is contained in:
hsc
2026-06-23 10:50:43 +08:00
parent 1e21d5f9f2
commit 5b721d2557
5 changed files with 33 additions and 12 deletions

View File

@@ -147,11 +147,14 @@ namespace TestingModule.ViewModels
}
// 4. 发布事件 → DialogMangerViewModel 接收后将此 View 添加为 Tab
// 标题格式:{当前作用域} - {设备名称},作为全局唯一 Tab 标识
// 标题格式:{当前作用域} - {设备名称}
// 去重依据:设备硬件指纹(同一物理设备不重复打开)
var fingerprint = DeviceManager.ExtractHardwareFingerprint(SelectedDevice);
_eventAggregator.GetEvent<AddDialogTabEvent>().Publish(new DialogTabInfo
{
Title = $"{_globalInfo.CurrentScope} - {SelectedDevice.DeviceName}",
Content = view
Title = $"{_globalInfo.CurrentScope} - {SelectedDevice.DeviceName}",
Fingerprint = fingerprint,
Content = view
});
// 5. 将窗口置顶(确保用户看到新增的 Tab