Пример #1
0
        private BitmapContainer CaptureMouse()
        {
            var cursorPosition = WinApiExtensions.GetCursorPosition();

            return(new BitmapContainer()
            {
                CursorX = cursorPosition.X,
                CursorY = cursorPosition.Y
            });
        }
Пример #2
0
        private BitmapContainer CaptureBitmap()
        {
            //this.DisposeBitmap();
            var oldBitmap = this.bitmap;

            Stopwatch.Measure("CaptureScreen", () => { this.bitmap = WinApiExtensions.CaptureScreen(this.screenIndex, true); });

            //var diffBitmap = Extensions.GetDifferences(oldBitmap, this.bitmap);

            var cursorPosition = WinApiExtensions.GetCursorPosition();

            return(new BitmapContainer()
            {
                CursorX = cursorPosition.X,
                CursorY = cursorPosition.Y,
                EncodedBitmap = this.bitmap.ConvertToString()
            });
        }