33 lines
949 B
C#
33 lines
949 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using ToastNotifications;
|
|
using ToastNotifications.Lifetime;
|
|
using ToastNotifications.Position;
|
|
using ToastNotifications.Messages;
|
|
using System.Windows;
|
|
|
|
namespace RomeOnlinePartner.Utils
|
|
{
|
|
public static class Notifications
|
|
{
|
|
public static Notifier notifier = new Notifier(cfg =>
|
|
{
|
|
cfg.PositionProvider = new PrimaryScreenPositionProvider(
|
|
corner: Corner.BottomRight,
|
|
offsetX: 10,
|
|
offsetY: 10);
|
|
/* * */
|
|
|
|
cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
|
|
notificationLifetime: TimeSpan.FromSeconds(3),
|
|
maximumNotificationCount: MaximumNotificationCount.FromCount(5));
|
|
|
|
cfg.Dispatcher = Application.Current.Dispatcher;
|
|
});
|
|
|
|
}
|
|
}
|