CAN作用域优化

This commit is contained in:
hsc
2026-07-06 11:37:09 +08:00
parent 6c2b975999
commit aec0044595
4 changed files with 95 additions and 57 deletions

View File

@@ -15,6 +15,7 @@ using UIShare;
using UIShare.GlobalVariable;
using UIShare.PubEvent;
using UIShare.UIViewModel;
using ZLGUSBCANFD;
namespace ADP.ViewModels
{
@@ -212,7 +213,17 @@ namespace ADP.ViewModels
#region
private void SelectCANMessage()
{
_dialogService.ShowDialog("SelectCanMessageView");
var canfd = CurrentConfig?.CANFD;
if (canfd == null||_globalInfo.CurrentScope=="default")
{
LoggerHelper.Warn("当前作用域未配置 CAN 设备,无法打开报文选择窗口。");
return;
}
_dialogService.ShowDialog("SelectCanMessageView", new DialogParameters
{
{ "CANFD", canfd }
}, _ => { });
}
private void ShowDialogManagerView()