将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

@@ -3,6 +3,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using DMS.WPF.ViewModels;
using DMS.WPF.Interfaces;
using DMS.WPF.Services;
using iNKORE.UI.WPF.Modern.Controls;
using Microsoft.Extensions.DependencyInjection;
@@ -39,7 +40,7 @@ public partial class VariableTableView : UserControl
}
catch (Exception exception)
{
var notificationService = App.Current.Services.GetRequiredService<NotificationService>();
var notificationService = App.Current.Services.GetRequiredService<INotificationService>();
notificationService.ShowError($"修改变量表启用,停用时发生了错误:{exception.Message}", exception);
}
}