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(); }
public static void BeginBufferMode(int bufferWidth, int bufferHeight) { _outputLayer = new ConsoleBufferOutputLayer(bufferWidth, bufferHeight); }