添加了NLog日志,并且配置了写入数据库,修改了Notification通知不使用依赖注入,而是使用Message的方式
This commit is contained in:
14
Helper/NotificationHelper.cs
Normal file
14
Helper/NotificationHelper.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using PMSWPF.Enums;
|
||||
using PMSWPF.Message;
|
||||
|
||||
namespace PMSWPF.Helper;
|
||||
|
||||
public class NotificationHelper
|
||||
{
|
||||
public static void ShowMessage(string msg, NotificationType notificationType=NotificationType.Info,bool isGlobal = false)
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send<NotificationMessage>(
|
||||
new NotificationMessage(msg, notificationType));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user