blob: 69f29ed0326239cee02d0afd60d060ce82915e73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
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);
}
}
}
|