清理引用,将NavigatorServices更改为使用Message来实现导航的切换

This commit is contained in:
2025-06-23 17:01:06 +08:00
parent 8ee4b7bc05
commit 8fcd2fdf2a
62 changed files with 711 additions and 767 deletions

View File

@@ -1,20 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Messaging.Messages;
using CommunityToolkit.Mvvm.Messaging.Messages;
namespace PMSWPF.Message
namespace PMSWPF.Message;
public class MyMessage : ValueChangedMessage<int>
{
public class MyMessage : ValueChangedMessage<int>
public MyMessage(int value) : base(value)
{
private int count;
public MyMessage(int value) : base(value)
{
}
public int Count { get => count; set => count = value; }
}
}
public int Count { get; set; }
}

View File

@@ -0,0 +1,11 @@
using CommunityToolkit.Mvvm.Messaging.Messages;
using PMSWPF.ViewModels;
namespace PMSWPF.Message;
public class NavgatorMessage : ValueChangedMessage<ViewModelBase>
{
public NavgatorMessage(ViewModelBase value) : base(value)
{
}
}

View File

@@ -3,13 +3,15 @@ using PMSWPF.Enums;
namespace PMSWPF.Message;
public class NotificationMessage:ValueChangedMessage<string>
public class NotificationMessage : ValueChangedMessage<string>
{
public NotificationMessage(string msg, NotificationType type = NotificationType.Info, bool isGlobal = false) :
base(msg)
{
Type = type;
IsGlobal = isGlobal;
}
public NotificationType Type { get; set; }
public bool IsGlobal { get; set; }
public NotificationMessage(string msg,NotificationType type=NotificationType.Info,bool isGlobal=false) : base(msg)
{
this.Type = type;
this.IsGlobal = isGlobal;
}
}

View File

@@ -1,13 +1,13 @@
using CommunityToolkit.Mvvm.Messaging.Messages;
namespace PMSWPF.Message
namespace PMSWPF.Message;
public class ReqMessage : RequestMessage<int>
{
public class ReqMessage : RequestMessage<int>
public ReqMessage(int count)
{
public int Count { get; set; }
public ReqMessage(int count)
{
Count = count;
}
Count = count;
}
}
public int Count { get; set; }
}