CAN修复

This commit is contained in:
“hsc”
2026-10-26 10:46:44 +08:00
parent e877dc9a90
commit 9cb139b208
12 changed files with 1462 additions and 167 deletions
+3 -2
View File
@@ -186,8 +186,9 @@ namespace MonitorModule.ViewModels
if (!string.IsNullOrEmpty(TestStatus))
_canSignalBroadcaster?.UnregisterScope(TestStatus);
// 3. 释放容器作用域
_scope?.Dispose();
// 注意:_scope 是从 GlobalInfo.ScopeDic 借用的工位作用域,拥有者是 AutomatedTestingViewModel,
// 这里不能 Dispose,否则关闭监控页就会销毁整个工位(DeviceManager/SystemConfig 全部失效,
// 并让 CAN 卡的作用域引用计数提前归零)。只清理本页面自己的资源即可。
Channels.Clear();
AvailableMethods.Clear();
}
+2 -1
View File
@@ -173,7 +173,8 @@ namespace MonitorModule.ViewModels
public void Dispose()
{
_scope?.Dispose();
// _scope 来自 GlobalInfo.ScopeDic,拥有者是 AutomatedTestingViewModel,
// 借用方不能 Dispose,否则关闭查询页会销毁整个工位并让 CAN 引用计数提前归零
}
#region 筛选条件加载