Beispiel #1
0
 private void NewNotification(Notification notification)
 {
     lock (_Database)
     {
         _Database.Notifications.Add(notification);
         _Database.Notifications.Sort(CompareNotifications);
         _Database.NotificationCount++;
     }
     SaveDatabase();
     PlayNotificationSound(notification);
     _MainWindow.NewNotification();
 }
Beispiel #2
0
        private void PlayNotificationSound(Notification notification)
        {
            switch (notification.GetNotificationType())
            {
                case NotificationType.Routine:
                    PlayNotificationSound();
                    break;

                default:
                    PlayErrorSound();
                    break;
            }
        }
Beispiel #3
0
 private int CompareNotifications(Notification x, Notification y)
 {
     return - x.Time.CompareTo(y.Time);
 }