refactor:完成重构设备的添加,删除,更新。
This commit is contained in:
@@ -24,7 +24,7 @@ namespace DMS.WPF.ViewModels
|
||||
private readonly INotificationService _notificationService;
|
||||
private readonly ITriggerManagementService _triggerManagementService;
|
||||
private readonly ITriggerDataService _triggerDataService;
|
||||
private readonly IWpfDataService _dataStorageService;
|
||||
private readonly IViewDataService _viewDataService;
|
||||
private readonly INavigationService _navigationService;
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +52,7 @@ namespace DMS.WPF.ViewModels
|
||||
INotificationService notificationService,
|
||||
ITriggerManagementService triggerManagementService,
|
||||
ITriggerDataService triggerDataService,
|
||||
IWpfDataService dataStorageService,
|
||||
IViewDataService dataStorageService,
|
||||
INavigationService navigationService)
|
||||
{
|
||||
_logger = logger;
|
||||
@@ -60,7 +60,7 @@ namespace DMS.WPF.ViewModels
|
||||
_notificationService = notificationService;
|
||||
_triggerManagementService = triggerManagementService;
|
||||
_triggerDataService = triggerDataService;
|
||||
_dataStorageService = dataStorageService;
|
||||
_viewDataService = dataStorageService;
|
||||
_navigationService = navigationService;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace DMS.WPF.ViewModels
|
||||
}
|
||||
|
||||
// 创建编辑对话框的视图模型
|
||||
TriggerDialogViewModel triggerDialogViewModel = new TriggerDialogViewModel(_dialogService, _dataStorageService, _notificationService);
|
||||
TriggerDialogViewModel triggerDialogViewModel = new TriggerDialogViewModel(_dialogService, _viewDataService, _notificationService);
|
||||
await triggerDialogViewModel.OnInitializedAsync(CurrentTrigger);
|
||||
|
||||
// 显示对话框
|
||||
@@ -157,7 +157,7 @@ namespace DMS.WPF.ViewModels
|
||||
{
|
||||
if (parameter == null) return Task.CompletedTask;
|
||||
|
||||
if (_dataStorageService.Triggers.TryGetValue(parameter.TargetId, out var triggerItem))
|
||||
if (_viewDataService.Triggers.TryGetValue(parameter.TargetId, out var triggerItem))
|
||||
{
|
||||
CurrentTrigger = triggerItem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user