mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-01 21:12:53 +00:00
41 lines
No EOL
983 B
C#
41 lines
No EOL
983 B
C#
using ReactiveUI;
|
|
|
|
namespace ServiceLib.Handler
|
|
{
|
|
public class NoticeHandler
|
|
{
|
|
public void Enqueue(string? content)
|
|
{
|
|
if (content.IsNullOrEmpty())
|
|
{
|
|
return;
|
|
}
|
|
MessageBus.Current.SendMessage(content, Global.CommandSendSnackMsg);
|
|
}
|
|
|
|
public void SendMessage(string? content)
|
|
{
|
|
if (content.IsNullOrEmpty())
|
|
{
|
|
return;
|
|
}
|
|
MessageBus.Current.SendMessage(content, Global.CommandSendMsgView);
|
|
}
|
|
|
|
public void SendMessageEx(string? content )
|
|
{
|
|
if (content.IsNullOrEmpty())
|
|
{
|
|
return;
|
|
}
|
|
content = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss} {content}";
|
|
SendMessage(content);
|
|
}
|
|
|
|
public void SendMessageAndEnqueue(string? msg)
|
|
{
|
|
Enqueue(msg);
|
|
SendMessage(msg);
|
|
}
|
|
}
|
|
} |