Esempio n. 1
0
        private void PrintText(ILogText text)
        {
            var isHeader  = text.Text.StartsWith("/* ");
            var isComment = text.Text.StartsWith("# ");

            if (isHeader || isComment)
            {
                Console.ForegroundColor = ConsoleColor.DarkGreen;
            }

            Console.WriteLine(text.Text);
            Console.ForegroundColor = ForegroundColor;
        }
Esempio n. 2
0
        private void AppendLogText(ILogText logText)
        {
            textBlock.Dispatcher.Invoke(() =>
            {
                var isHeader  = logText.Text.StartsWith("/* ");
                var isComment = logText.Text.StartsWith("# ");
                var brush     = isHeader || isComment ? Brushes.LimeGreen : textBlock.Foreground;

                textBlock.Inlines.Add(new Run($"{logText.Text}{Environment.NewLine}")
                {
                    FontWeight = isHeader ? FontWeights.Bold : FontWeights.Normal,
                    Foreground = brush
                });
            });
        }
Esempio n. 3
0
 private void AppendLogText(ILogText text)
 {
     textBlock.Inlines.Add(new Run($"{text.Text}{Environment.NewLine}"));
 }