Exemple #1
0
 public static extern int ReadConsoleOutputCharacter(HANDLE hConsoleOutput, string lpCharacter, int nLength, COORD dwReadCoord, ref int lpNumberOfCharsRead);
Exemple #2
0
        public void SetCharByte(int x, int y, byte ch)
        {
            var ar = new byte[] { (byte)ch };

            var coord = new COORD() {
            X = (short)x,
            Y = (short)y
            };
            UInt32 dw;
            Api.Win32Check(Api.WriteConsoleOutputCharacterA(Handle, ar, 1, coord, out dw));
        }
Exemple #3
0
 public static extern int ReadConsoleOutputAttribute(HANDLE hConsoleOutput, ref int lpAttribute, int nLength, COORD dwReadCoord, ref int lpNumberOfAttrsRead);
Exemple #4
0
 public static extern bool SetConsoleCursorPosition(SafeHandle h, COORD coord);
Exemple #5
0
        public void SetChar(int x, int y, char ch)
        {
            var ar = new char[] { ch };

            var coord = new COORD() {
            X = (short)x,
            Y = (short)y
            };
            UInt32 dw;
            Api.Win32Check(Api.WriteConsoleOutputCharacter(Handle, ar, 1, coord, out dw));
        }
Exemple #6
0
 public static extern int SetConsoleScreenBufferSize(HANDLE hConsoleOutput, COORD dwSize);
Exemple #7
0
 public static extern int WriteConsoleOutputAttribute(HANDLE hConsoleOutput, short lpAttribute, int nLength, COORD dwWriteCoord, ref int lpNumberOfAttrsWritten);
Exemple #8
0
 public static extern bool WriteConsoleOutputAttribute(SafeHandle h, UInt16[] buf, UInt32 nLength, COORD coord, out DWORD dwRead);
Exemple #9
0
        public UInt16 GetAttr(int x, int y)
        {
            var ar = new UInt16[1];

            var coord = new COORD() {
            X = (short)x,
            Y = (short)y
            };
            UInt32 dw;
            Api.Win32Check(Api.ReadConsoleOutputAttribute(Handle, ar, 1, coord, out dw));
            return ar[0];
        }
Exemple #10
0
 public static extern bool ReadConsoleOutputCharacterA(SafeHandle h, byte[] buf, UInt32 nLength, COORD coord, out DWORD dwRead);
Exemple #11
0
 public static extern bool WriteConsoleOutputCharacter(SafeHandle h, char[] buf, UInt32 nLength, COORD coord, out DWORD dwRead);
Exemple #12
0
 public static extern bool SetConsoleCursorPosition(SafeHandle h, COORD coord);
Exemple #13
0
 public static extern bool WriteConsoleOutputCharacterA(SafeHandle h, byte[] buf, UInt32 nLength, COORD coord, out DWORD dwRead);
Exemple #14
0
 public static extern bool WriteConsoleOutputAttribute(SafeHandle h, UInt16[] buf, UInt32 nLength, COORD coord, out DWORD dwRead);
Exemple #15
0
 public static extern int ScrollConsoleScreenBuffer(HANDLE hConsoleOutput, ref SMALL_RECT lpScrollRectangle, ref SMALL_RECT lpClipRectangle, COORD dwDestinationOrigin, ref CHAR_INFO lpFill);
Exemple #16
0
        public byte GetCharByte(int x, int y)
        {
            var ar = new byte[1];

            var coord = new COORD() {
            X = (short)x,
            Y = (short)y
            };
            UInt32 dw;
            Api.Win32Check(Api.ReadConsoleOutputCharacterA(Handle, ar, 1, coord, out dw));
            return ar[0];
        }
Exemple #17
0
 public static extern int SetConsoleCursorPosition(HANDLE hConsoleOutput, COORD dwCursorPosition);
Exemple #18
0
        public void Scroll(Rectangle rect, Rectangle? clip, Point origin, CHAR_INFO fill)
        {
            var r = new SMALL_RECT() {
            Left = (short)rect.Left,
            Top = (short)rect.Top,
            Right = (short)rect.Right,
            Bottom = (short)rect.Bottom
            };

            var d = new COORD() {
            X = (short)origin.X,
            Y = (short)(origin.Y) //!!!
            };

            Api.Win32Check(Api.ScrollConsoleScreenBuffer(Handle, ref r , IntPtr.Zero, d.ToInt32(), ref fill));
        }
Exemple #19
0
 public static extern int WriteConsoleOutput(HANDLE hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion);
Exemple #20
0
        public void SetAttr(int x, int y, UInt16 attr)
        {
            var ar = new UInt16[] { attr };

            var coord = new COORD() {
            X = (short)x,
            Y = (short)y
            };
            UInt32 dw;
            Api.Win32Check(Api.WriteConsoleOutputAttribute(Handle, ar, 1, coord, out dw));
        }
Exemple #21
0
 public static extern int WriteConsoleOutputCharacter(HANDLE hConsoleOutput, string lpCharacter, int nLength, COORD dwWriteCoord, ref int lpNumberOfCharsWritten);
Exemple #22
0
 public static extern bool ReadConsoleOutputCharacter(SafeHandle h, char[] buf, UInt32 nLength, COORD coord, out DWORD dwRead);