예제 #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);
 }