29 lines
802 B
C#
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);
|
|
}
|
|
}
|
|
}
|