Exemple #1
0
 public void SetConsoleWindowInfo(bool absolute, SmallRect consoleWindow)
 {
     if (!NativeMethods.SetConsoleWindowInfo(_outputHandle, absolute, ref consoleWindow))
     {
         HandleError();
     }
 }
Exemple #2
0
        public CharInfo[] ReadConsoleOutput(Coord bufferSize, Coord bufferCoord, SmallRect readRegion)
        {
            var buffer = new CharInfo[bufferSize.X * bufferSize.Y];

            if (!NativeMethods.ReadConsoleOutput(_outputHandle, buffer, bufferSize, bufferCoord, ref readRegion))
            {
                HandleError();
            }

            return(buffer);
        }
Exemple #3
0
 public static extern bool ReadConsoleOutput(
     IntPtr hConsoleOutput,
     [Out] CharInfo[] lpBuffer,
     Coord dwBufferSize,
     Coord dwBufferCoord,
     ref SmallRect lpReadRegion);
Exemple #4
0
 public static extern bool SetConsoleWindowInfo(
     IntPtr hConsoleOutput,
     bool bAbsolute,
     ref SmallRect lpConsoleWindow);
Exemple #5
0
 public static extern bool WriteConsoleOutput(
     IntPtr hConsoleOutput,
     CharInfo[] lpBuffer,
     Coord dwBufferSize,
     Coord dwBufferCoord,
     ref SmallRect lpWriteRegion);
Exemple #6
0
 public void WriteConsoleOutput(CharInfo[] buffer, Coord bufferSize, Coord bufferCoord, SmallRect writeRegion)
 {
     if (!NativeMethods.WriteConsoleOutput(_outputHandle, buffer, bufferSize, bufferCoord, ref writeRegion))
     {
         HandleError();
     }
 }