refactor:完成重构设备的添加,删除,更新。

This commit is contained in:
2025-10-22 14:06:16 +08:00
parent e995ec7207
commit 54d040b45f
76 changed files with 1028 additions and 1161 deletions

View File

@@ -21,8 +21,8 @@ namespace DMS.WPF.ViewModels;
public partial class MainViewModel : ViewModelBase
{
private readonly IDialogService _dialogService;
private readonly IWPFDataService _wpfDataService;
private readonly IWpfDataService _dataStorageService;
private readonly IViewCenterService _wpfDataService;
private readonly IViewDataService _viewDataService;
private readonly INavigationService _navigationService;
private readonly ILogger<MainViewModel> _logger;
@@ -46,14 +46,14 @@ public partial class MainViewModel : ViewModelBase
/// <param name="dialogService">对话框服务。</param>
/// <param name="logger">日志记录器。</param>
/// <param name="wpfDataService"></param>
public MainViewModel(IWPFDataService wpfDataService ,IWpfDataService dataStorageService,INavigationService navigationService,
public MainViewModel(IViewCenterService wpfDataService ,IViewDataService dataStorageService,INavigationService navigationService,
ILogger<MainViewModel> logger)
{
_wpfDataService = wpfDataService;
_dataStorageService = dataStorageService;
_viewDataService = dataStorageService;
_navigationService = navigationService;
_logger = logger;
MenuTrees = _dataStorageService.MenuTrees;
MenuTrees = _viewDataService.MenuTrees;
CurrentViewModel = new HomeViewModel();
CurrentViewModel.OnLoaded();