private void OnFilterChecked(object sender, RoutedEventArgs e) { LogEntriesFiltered.Clear(); foreach (LoggingEvent log in LogEntries) { AddFilteredEntry(log); } }
private void LogAppender_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { switch (e.Action) { case System.Collections.Specialized.NotifyCollectionChangedAction.Add: e.NewItems.Cast <LoggingEvent>().ToList().ForEach(x => AddEntry(x)); break; case System.Collections.Specialized.NotifyCollectionChangedAction.Reset: LogEntries.Clear(); LogEntriesFiltered.Clear(); App.PrintHeader(); break; } }