Files
VDownload/VDownload.Services/VDownload.Services.UI/VDownload.Services.UI.Notifications/NotificationsService.cs
Mateusz Skoczek e3ec5c3a48 twitch vod downloading done
ffmpeg essentials

fix

Project reorganized

git lfs

ffmpeg removed

ffmpeg added
2024-02-22 02:25:13 +01:00

37 lines
978 B
C#

using Microsoft.Windows.AppNotifications;
using Microsoft.Windows.AppNotifications.Builder;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Services.UI.Notifications
{
public interface INotificationsService
{
void SendNotification(string title, IEnumerable<string> message);
}
public class NotificationsService : INotificationsService
{
#region PUBLIC METHODS
public void SendNotification(string title, IEnumerable<string> message)
{
AppNotificationBuilder builder = new AppNotificationBuilder();
builder.AddText(title);
foreach (string text in message)
{
builder.AddText(text);
}
AppNotification notification = builder.BuildNotification();
AppNotificationManager.Default.Show(notification);
}
#endregion
}
}