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

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