private void InnerAppendLog(common.LogLevel level, string from, string content) { var item = new LogItem(level, from, content); LogItems.Add(item); if (FilterFrom.Add(from, true)) { SelfUpdate = true; SourceFilter.SelectedItems.Add(from); SelfUpdate = false; } else if (!LogFilter(item)) { return; } ScrollCheck(); }
public LogItem(common.LogLevel level, string source, string text) { Level = level; Source = source; Text = text; }
public void OnNewLog(common.LogLevel level, string from, string content) { Dispatcher.InvokeAsync(() => InnerAppendLog(level, from, content.Trim()), System.Windows.Threading.DispatcherPriority.Normal); }