Added new notification nuget. Added auto regenerate JWT token on error.
This commit is contained in:
32
BodyshopUploader/Utils/Notifications.cs
Normal file
32
BodyshopUploader/Utils/Notifications.cs
Normal 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;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user