Added new notification nuget. Added auto regenerate JWT token on error.

This commit is contained in:
Patrick Fic
2020-07-24 11:14:51 -07:00
parent e8c58dab2f
commit 32ec745c77
8 changed files with 123 additions and 48 deletions

View File

@@ -0,0 +1,32 @@
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 BodyshopPartner.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;
});
}
}