public static void AddToLog(OutgoingMessage message, string text, LogTypes type) { LogItem item = new LogItem(message, text, type, Format); _loglist.Insert(0, item); SetView(item); }
private static void SetView(LogItem item) { if (Application.Current.Dispatcher.CheckAccess()) { if (_block != null && _listBox != null) { _block.Text = item.SortMessage; IsFilters(item); _listBox.Items.Refresh(); } } else { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { if (_block != null && _listBox != null) { _block.Text = item.SortMessage; IsFilters(item); _listBox.Items.Refresh(); } })); } }
private static void IsFilters(LogItem item) { if(_listtypes.Contains(item.MessageType)) _filteredloglist.Insert(0,item); }
public static void AddToLog(string text, LogTypes type) { LogItem item = new LogItem(text, type, Format); _loglist.Insert(0, item); SetView(item); }