Example #1
0
 private void IAddEvent(TraceEvent te)
 {
     var p = new Paragraph
                 {
                     TextAlignment = TextAlignment.Left,
                     Margin = new Thickness(0),
                     Inlines =
                         {
                             //new Line() { X1 = 0, X2 = 40, Y1 = -4, Y2 = -4, StrokeThickness = 2, Stroke = TurnBrush },
                             new Run(te.ToString()) {Foreground = _turnBrush, FontWeight = FontWeights.Bold}
                             //new Line() { X1 = 0, X2 = 40, Y1 = -4, Y2 = -4, StrokeThickness = 2, Stroke = TurnBrush }
                         }
                 };
     if (output.Document.Blocks.LastBlock != null)
         if (((Paragraph) output.Document.Blocks.LastBlock).Inlines.Count == 0)
             output.Document.Blocks.Remove(output.Document.Blocks.LastBlock);
     output.Document.Blocks.Add(p);
     output.Document.Blocks.Add(new Paragraph {Margin = new Thickness()}); // Restore left alignment
     output.ScrollToEnd();
 }
Example #2
0
 private void AddEvent(TraceEvent te)
 {
     Dispatcher.Invoke(new Action<TraceEvent>(IAddEvent), new object[] {te});
 }
Example #3
0
 private void Add_Event(TraceEvent te)
 {
     this.Dispatcher.Invoke(new Action<TraceEvent>(i_Add_Event), new object[1] { te });
 }