コード例 #1
0
        private void RefreshNotificationsList()
        {
            CurrentNotifications.Clear();
            List <ConsoleNotificationContent> temp_list = new List <ConsoleNotificationContent>();

            if (ShowErrors)
            {
                foreach (var element in errors_list)
                {
                    temp_list.Add(element);
                }
            }

            if (ShowInformations)
            {
                foreach (var element in informations_list)
                {
                    temp_list.Add(element);
                }
            }

            if (ShowResults)
            {
                foreach (var element in results_list)
                {
                    temp_list.Add(element);
                }
            }

            if (ShowWarnings)
            {
                foreach (var element in warnings_list)
                {
                    temp_list.Add(element);
                }
            }

            temp_list.Sort((a, b) => b.notifDate.CompareTo(a.notifDate));
            foreach (var element in temp_list)
            {
                CurrentNotifications.Add(element);
            }
        }
コード例 #2
0
 /// <summary>
 /// Clears all notifications
 /// </summary>
 public void ClearNotifications()
 {
     CurrentNotifications.Clear();
     CurrentNotificationsCount = CurrentNotifications.Count;
     RaiseEvent(new RoutedEventArgs(NotificationChangedEvent));
 }