增加了初始弹窗,但是没有成功

更改了CAN和LIN协调
更改了配置程序的名称顺序
This commit is contained in:
2025-01-11 12:04:34 +08:00
parent 620c5e8178
commit e49a48fb25
53 changed files with 5118 additions and 131 deletions

View File

@@ -0,0 +1,41 @@
using CapMachine.Wpf.Services;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Ioc;
namespace CapMachine.Wpf.ViewModels
{
public class TaskBarViewModel : BindableBase
{
private readonly IHostDialogService dialog;
private readonly IAppStartService appStartService;
public DelegateCommand ExitCommand { get; set; }
public DelegateCommand ShowViewCommand { get; private set; }
public TaskBarViewModel()
{
dialog = ContainerLocator.Container.Resolve<IHostDialogService>();
appStartService = ContainerLocator.Container.Resolve<IAppStartService>();
ExitCommand = new DelegateCommand(Exit);
ShowViewCommand = new DelegateCommand(ShowView);
}
private async void Exit()
{
ShowView();
if (await dialog.Question("确定","1"))
appStartService.Exit();
}
private void ShowView()
{
if (!App.Current.MainWindow.IsVisible)
{
App.Current.MainWindow.Show();
App.Current.MainWindow.WindowState = System.Windows.WindowState.Normal;
}
}
}
}