31 lines
943 B
C#
31 lines
943 B
C#
using Avalonia.Controls.Notifications;
|
|
using Notification = Ursa.Controls.Notification;
|
|
using WindowNotificationManager = Ursa.Controls.WindowNotificationManager;
|
|
|
|
namespace Cowain.Base.Helpers;
|
|
|
|
public static class NotificationHelper
|
|
{
|
|
public static WindowNotificationManager? NotificationManager { get; set; }
|
|
|
|
|
|
public static void ShowNormal(NotificationType notificationType, string message)
|
|
{
|
|
NotificationManager?.Show(
|
|
new Notification(notificationType.ToString(), message),
|
|
showIcon: true,
|
|
showClose: true,
|
|
type: notificationType);
|
|
}
|
|
|
|
public static void ShowLight(NotificationType notificationType, string message)
|
|
{
|
|
NotificationManager?.Show(
|
|
new Notification(notificationType.ToString(), message),
|
|
showIcon: true,
|
|
showClose: true,
|
|
type: notificationType,
|
|
classes: ["Light"]);
|
|
}
|
|
}
|