Пример #1
0
        internal static void Paint(int left, int top, int height, int width, Buffer buffer)
        {
            var rectangle = new NativeMethods.SmallRect()
            {
                Top = (short)top, Left = (short)left, Bottom = (short)(top + height), Right = (short)(left + width)
            };
            var coord = new NativeMethods.Coord((short)left, (short)top);

            bool b = WriteConsoleOutput(OutputHandle, buffer.Value,
                                        buffer.Size,
                                        coord,
                                        ref rectangle);

            if (!b)
            {
                var e = new Win32Exception();

                System.Diagnostics.Debug.WriteLine(e.Message);
            }
        }
Пример #2
0
        internal static void Paint(int left, int top, int height, int width, Buffer buffer)
        {
            var rectangle = new NativeMethods.SmallRect() { Top = (short)top, Left = (short)left, Bottom = (short)(top + height), Right = (short)(left + width) };
            var coord = new NativeMethods.Coord((short)left, (short)top);

            bool b = WriteConsoleOutput(OutputHandle, buffer.Value,
              buffer.Size,
              coord,
              ref rectangle);

            if (!b)
            {
                var e = new Win32Exception();

                System.Diagnostics.Debug.WriteLine(e.Message);
            }
        }