using BreCalClient.misc.Model; using System.Windows; using System.Windows.Media; using ToastNotifications.Core; namespace BreCalClient { /// /// Interaction logic for NotificationPart.xaml /// public partial class AppNotificationPart : NotificationDisplayPart { public AppNotificationPart(AppNotificationMessage appNotification) { InitializeComponent(); Bind(appNotification); if (appNotification.Options.Tag is AppNotification ap) { switch (ap.NotificationType) { case "TimeConflict": this.ContentWrapper.Background = Brushes.Red; break; case "TimeConflictResolved": this.ContentWrapper.Background = Brushes.Green; break; case "Assignment": this.ContentWrapper.Background = Brushes.Blue; break; case "Next24h": this.ContentWrapper.Background = Brushes.DarkOrange; break; case "Unassigned": this.ContentWrapper.Background = Brushes.Gray; break; default: break; } } } private void OnClose(object sender, RoutedEventArgs e) { Notification.Close(); } } }