using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace Tango.ScreenCapture { public class CaptureRegion { public int Left { get; set; } public int Top { get; set; } public int Width { get; set; } public int Height { get; set; } public CaptureRegion() { } public CaptureRegion(Rectangle rect) { Left = rect.Left; Top = rect.Top; Width = rect.Width; Height = rect.Height; } public CaptureRegion(Rect rect) { Left = (int)rect.Left; Top = (int)rect.Top; Width = (int)rect.Width; Height = (int)rect.Height; } public CaptureRegion(int left, int top, int width, int height) { Left = left; Top = top; Width = width; Height = height; } public static CaptureRegion PrimaryScreenBounds() { return new CaptureRegion(System.Windows.Forms.Screen.PrimaryScreen.Bounds); } } }