Esempio n. 1
0
 public void CaptureByRect(Rect rect)
 {
     if (rect.IsEmpty == false)
     {
         var image = WindowSnap.GetBitmapInCoordinates((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height) as Bitmap;
         this.SaveImage(image);
     }
 }
Esempio n. 2
0
        private void CaptureArea()
        {
            this.uiWindow.HideWin();
            this.captureAreaWindow.ShowCaptureArea((Rect rect) =>
            {
                var image = WindowSnap.GetBitmapInCoordinates((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height) as Bitmap;

                // hide the current window, on complete show it back
                this.captureAreaWindow.HideCaptureArea();
                this.uiWindow.ShowWin();

                this.SaveImage(image);
            });
        }