将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

@@ -1,5 +1,6 @@
using DMS.Services;
using DMS.WPF.Helper;
using DMS.WPF.Interfaces;
using DMS.WPF.Services;
using DMS.WPF.ViewModels.Dialogs;
using DMS.WPF.ViewModels.Items;
@@ -52,7 +53,7 @@ public partial class ImportOpcUaDialog : ContentDialog
}
catch (Exception ex)
{
var notificationService = App.Current.Services.GetRequiredService<NotificationService>();
var notificationService = App.Current.Services.GetRequiredService<INotificationService>();
notificationService.ShowError($"选择节点时发生了错误:{ex.Message}");
}