Exemple #1
0
        public static void EndBufferMode()
        {
            var layer = _outputLayer as ConsoleBufferOutputLayer;

            if (layer == null)
            {
                throw new InvalidOperationException("Buffer Mode is not running");
            }

            WriteBuffer(layer.Buffer);

            //Do back
            Console.SetCursorPosition(layer.CursorLeft, layer.CursorTop);
            Console.ForegroundColor = layer.ForegroundColor;
            Console.BackgroundColor = layer.BackgroundColor;

            _outputLayer = new ConsoleDefaultOutputLayer();
        }
Exemple #2
0
 public static void BeginBufferMode(int bufferWidth, int bufferHeight)
 {
     _outputLayer = new ConsoleBufferOutputLayer(bufferWidth, bufferHeight);
 }