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

@@ -24,11 +24,11 @@ namespace DMS.WPF.ViewModels;
partial class LogHistoryViewModel : ViewModelBase,IDisposable
{
private readonly IWPFDataService _wpfDataService ;
private readonly IViewCenterService _wpfDataService ;
private readonly IMapper _mapper;
private readonly INlogAppService _nlogAppService;
private readonly IDialogService _dialogService;
private readonly IWpfDataService _dataStorageService;
private readonly IViewDataService _viewDataService;
private readonly INotificationService _notificationService;
private readonly IAppCenterService _appCenterService;
@@ -50,18 +50,18 @@ partial class LogHistoryViewModel : ViewModelBase,IDisposable
public ObservableCollection<string> LogLevels { get; } = new ObservableCollection<string> { "Trace", "Debug", "Info", "Warn", "Error", "Fatal" };
public LogHistoryViewModel(IMapper mapper, INlogAppService nlogAppService, IDialogService dialogService, IWpfDataService dataStorageService
, INotificationService notificationService, IWPFDataService wpfDataService, IAppCenterService appCenterService)
public LogHistoryViewModel(IMapper mapper, INlogAppService nlogAppService, IDialogService dialogService, IViewDataService dataStorageService
, INotificationService notificationService, IViewCenterService wpfDataService, IAppCenterService appCenterService)
{
_mapper = mapper;
_nlogAppService = nlogAppService;
_dialogService = dialogService;
_dataStorageService = dataStorageService;
_viewDataService = dataStorageService;
_notificationService = notificationService;
_wpfDataService = wpfDataService;
_appCenterService = appCenterService;
_logItemList = new ObservableList<NlogItem>(_dataStorageService.Nlogs);
_logItemList = new ObservableList<NlogItem>(_viewDataService.Nlogs);
_synchronizedView = _logItemList.CreateView(v => v);
LogItemListView = _synchronizedView.ToNotifyCollectionChanged();