SoraV2Utils/SoraV2Utils_Agent/NotificationSender.cs
krjan02 26cde137c9
Some checks failed
Build and Relase / build-release (push) Failing after 38s
Build and Relase / create-release (push) Failing after 10s
Initial commit (1.0.0)
2025-01-13 16:27:29 +01:00

29 lines
802 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Data.Xml.Dom;
using Windows.UI.Notifications;
namespace SoraV2Utils_Agent
{
public interface IToastNotification
{
void SendToastNotification(string xml, string title);
}
public class NotificationSender : IToastNotification
{
public void SendToastNotification(string xml, string title)
{
XmlDocument tileXml = new XmlDocument();
tileXml.LoadXml(xml);
var toastNotification = new ToastNotification(tileXml);
toastNotification.Priority = ToastNotificationPriority.High;
ToastNotificationManager.CreateToastNotifier(title).Show(toastNotification);
}
}
}