Exemple #1
0
 public HighSpeedWriter(short width, short height, Colors defaultColors = null, char clearScreenChar = ' ')
 {
     PlatformStuff.EnsureRunningWindows();
     new PlatformStuff().LockResizing(width, height);
     _consoleFileHandle = OpenConsole();
     _height            = height;
     _width             = width;
     Colors             = defaultColors ?? new Colors(ConsoleColor.Gray, ConsoleColor.Black);
     _buffer            = new CharAndColor[_width * _height];
     _scroller          = new Scroller(_buffer, _width, _height, clearScreenChar, Colors);
     _consoleWriteArea  = new ConsoleRegion(0, 0, (short)(_width - 1), (short)(_height - 1));
     ClearScreen();
 }
Exemple #2
0
 public static Window LockConsoleResizing(this Window window, int width, int height, bool allowClose = true, bool allowMinimize = true)
 {
     PlatformStuff.EnsureRunningWindows();
     new PlatformStuff().LockResizing(width, height, allowClose, allowMinimize);
     return(window);
 }