Exemplo n.º 1
0
 public void Render()
 {
     console.BeginRendering();
     currentLeft = console.CursorLeft;
     currentTop  = console.CursorTop;
     if (config.UseColor)
     {
         currentForeground       = console.ForegroundColor;
         currentBackground       = console.BackgroundColor;
         console.ForegroundColor = config.ForegroundColor;
         console.BackgroundColor = config.BackgroundColor;
     }
     try
     {
         Draw();
     }
     finally
     {
         if (config.UseColor)
         {
             console.ForegroundColor = currentForeground;
             console.BackgroundColor = currentBackground;
         }
         console.SetCursorPosition(currentLeft, currentTop);
         console.EndRendering();
     }
 }