예제 #1
0
        private void ToggleLogEntryBookmark()
        {
            LogEntryViewModel selected = lstLog.SelectedItem as LogEntryViewModel;

            if (selected != null)
            {
                selected.Bookmarked = !selected.Bookmarked;
            }
        }
예제 #2
0
        private void NotifyIfRequired(LogEntryViewModel logEntry)
        {
            bool accepted = filters.All(filter => filter.Accept(logEntry));

            if (accepted)
            {
                foreach (INotifier notifier in notifiers)
                {
                    notifier.Notify(logEntry);
                }
            }
        }
예제 #3
0
 void watcher_LogEntryDiscovered(object sender, LogEntryDiscoveredEventArgs e)
 {
     Dispatcher.BeginInvoke((Action)(() =>
     {
         var le = new LogEntryViewModel(e.LogEntry);
         logEntries.Add(le);
         if (this.Visibility == System.Windows.Visibility.Visible)
         {
             lstLog.ScrollIntoView(le);
         }
         NotifyIfRequired(le);
     }
                                     ));
 }