上下限监控
This commit is contained in:
@@ -150,6 +150,7 @@ namespace ADP.ViewModels
|
||||
public ICommand ShowDialogManagerViewCommand { get; set; }
|
||||
public ICommand SelectCANSignalMonitorCommand { get; set; }
|
||||
public ICommand SelectCANMessageCommand { get; set; }
|
||||
public ICommand MonitorValueSettingCommand { get; set; }
|
||||
public ICommand GetFileStringCommand { get; set; }
|
||||
#endregion
|
||||
|
||||
@@ -182,6 +183,7 @@ namespace ADP.ViewModels
|
||||
SetDefaultCommand = new DelegateCommand(SetDefault);
|
||||
SelectCANSignalMonitorCommand = new DelegateCommand(SelectCANSignalMonitor);
|
||||
SelectCANMessageCommand = new DelegateCommand(SelectCANMessage);
|
||||
MonitorValueSettingCommand = new DelegateCommand(MonitorValueSetting);
|
||||
GetFileStringCommand = new DelegateCommand(GetFileString);
|
||||
|
||||
_globalInfo.ContextDic.Add("default", new ScopedContext());
|
||||
@@ -205,7 +207,7 @@ namespace ADP.ViewModels
|
||||
_uiRefreshTimer.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void RefreshAllContextProperties()
|
||||
{
|
||||
RaisePropertyChanged(nameof(RunState));
|
||||
@@ -232,12 +234,24 @@ namespace ADP.ViewModels
|
||||
});
|
||||
}
|
||||
}
|
||||
private void MonitorValueSetting()
|
||||
{
|
||||
if ( _globalInfo.CurrentScope == "default")
|
||||
{
|
||||
LoggerHelper.Warn("当前作用域未配置 CAN 设备,无法打开报文选择窗口。");
|
||||
return;
|
||||
}
|
||||
_dialogService.ShowDialog("ValueLimitView", new DialogParameters
|
||||
{
|
||||
{ "Scope", _globalInfo.ScopeDic[_globalInfo.CurrentScope] }
|
||||
}, _ => { });
|
||||
}
|
||||
|
||||
private void SelectCANSignalMonitor()
|
||||
{
|
||||
var canfd = CurrentConfig?.CANFD;
|
||||
if (canfd == null || _globalInfo.CurrentScope == "default")
|
||||
{
|
||||
LoggerHelper.Warn("当前作用域未配置 CAN 设备,无法打开报文选择窗口。");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,15 @@ Command="{Binding SelectCANSignalMonitorCommand}">
|
||||
Foreground="Black" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<!-- CAN报文选择 -->
|
||||
<!-- 监控设置 -->
|
||||
<MenuItem Header="监控设置"
|
||||
Foreground="Black"
|
||||
Command="{Binding MonitorValueSettingCommand}">
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="Monitor"
|
||||
Foreground="Black" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="CAN报文选择"
|
||||
Foreground="Black"
|
||||
Command="{Binding SelectCANMessageCommand}">
|
||||
@@ -175,7 +183,7 @@ Command="{Binding SelectCANMessageCommand}">
|
||||
<materialDesign:PackIcon Kind="Message"
|
||||
Foreground="Black" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<!-- 获得文件路径字符串 -->
|
||||
<MenuItem Header="获得文件路径字符串"
|
||||
Foreground="Black"
|
||||
|
||||
Reference in New Issue
Block a user