示例#1
0
 public static void AddToLog(OutgoingMessage message, string text, LogTypes type)
 {
     LogItem item = new LogItem(message, text, type, Format);
     _loglist.Insert(0, item);
     SetView(item);
 }
示例#2
0
 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();
             }
         }));
     }
 }
示例#3
0
 private static void IsFilters(LogItem item)
 {
     if(_listtypes.Contains(item.MessageType))
         _filteredloglist.Insert(0,item);
 }
示例#4
0
 public static void AddToLog(string text, LogTypes type)
 {
     LogItem item = new LogItem(text, type, Format);
     _loglist.Insert(0, item);
     SetView(item);
 }