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

            if (selected != null)
            {
                selected.Bookmarked = !selected.Bookmarked;
            }
        }
Exemple #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);
                }
            }
        }
Exemple #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);
     }
                                     ));
 }