将NotificationService抽取成接口,并将所有使用NotificationService全部替换为接口INotificationService

This commit is contained in:
2025-09-04 19:59:35 +08:00
parent bb650e2682
commit 9d446c370e
12 changed files with 95 additions and 31 deletions

View File

@@ -6,6 +6,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DMS.Core.Interfaces.Services;
using DMS.Core.Models;
using DMS.WPF.Interfaces;
using DMS.WPF.Services;
using DMS.WPF.ViewModels.Items;
@@ -15,7 +16,7 @@ public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<Varia
{
private readonly IMapper _mapper;
private readonly IExcelService _excelService;
private readonly NotificationService _notificationService;
private readonly INotificationService _notificationService;
[ObservableProperty]
private string? _filePath;
@@ -29,7 +30,7 @@ public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<Varia
[ObservableProperty]
private IList _selectedVariables = new ArrayList();
public ImportExcelDialogViewModel(IMapper mapper,IExcelService excelService, NotificationService notificationService)
public ImportExcelDialogViewModel(IMapper mapper,IExcelService excelService, INotificationService notificationService)
{
_mapper = mapper;
_excelService = excelService;