IO板卡系统优化
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
using DeviceCommand.Device;
|
||||
using Logger;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Microsoft.Win32;
|
||||
@@ -152,6 +153,7 @@ namespace ADP.ViewModels
|
||||
public ICommand SelectCANMessageCommand { get; set; }
|
||||
public ICommand MonitorValueSettingCommand { get; set; }
|
||||
public ICommand GetFileStringCommand { get; set; }
|
||||
public ICommand SilenceBuzzerCommand { get; set; }
|
||||
#endregion
|
||||
|
||||
public ShellViewModel(IContainerProvider containerProvider)
|
||||
@@ -185,6 +187,7 @@ namespace ADP.ViewModels
|
||||
SelectCANMessageCommand = new DelegateCommand(SelectCANMessage);
|
||||
MonitorValueSettingCommand = new DelegateCommand(MonitorValueSetting);
|
||||
GetFileStringCommand = new DelegateCommand(GetFileString);
|
||||
SilenceBuzzerCommand = new AsyncDelegateCommand(SilenceBuzzer);
|
||||
|
||||
_globalInfo.ContextDic.Add("default", new ScopedContext());
|
||||
|
||||
@@ -207,7 +210,7 @@ namespace ADP.ViewModels
|
||||
_uiRefreshTimer.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void RefreshAllContextProperties()
|
||||
{
|
||||
RaisePropertyChanged(nameof(RunState));
|
||||
@@ -218,6 +221,12 @@ namespace ADP.ViewModels
|
||||
}
|
||||
|
||||
#region 命令处理与事件
|
||||
|
||||
private async Task SilenceBuzzer()
|
||||
{
|
||||
_eventAggregator.GetEvent<SilenceBuzzerEvent>().Publish(_globalInfo.CurrentScope);
|
||||
|
||||
}
|
||||
private void GetFileString()
|
||||
{
|
||||
var openFileDialog = new OpenFileDialog
|
||||
|
||||
@@ -193,8 +193,8 @@ Command="{Binding GetFileStringCommand}">
|
||||
Foreground="Black" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
|
||||
<!-- 蜂鸣器消音 -->
|
||||
|
||||
<!-- 弹窗管理器 -->
|
||||
<MenuItem Header="弹窗管理器"
|
||||
FontSize="14"
|
||||
Height="50"
|
||||
|
||||
Reference in New Issue
Block a user