示例#1
0
        private void SetPalette(FormatToken token, ConsolePalette palette)
        {
            var property = token as PropertyToken;

            if (property != null)
            {
                _console.BackgroundColor = palette.ArgumentBackground;
                _console.ForegroundColor = palette.ArgumentForeground;
            }
            else
            {
                _console.BackgroundColor = palette.Background;
                _console.ForegroundColor = palette.Foreground;
            }
        }
示例#2
0
 private void SetPalette(FormatToken token, ConsolePalette palette)
 {
     var property = token as PropertyToken;
     if (property != null)
     {
         _console.BackgroundColor = palette.ArgumentBackground;
         _console.ForegroundColor = palette.ArgumentForeground;
     }
     else
     {
         _console.BackgroundColor = palette.Background;
         _console.ForegroundColor = palette.Foreground;
     }
 }