aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Experiments/Tango.RemoteDesktop/Tango.ScreenCapture/CaptureRegion.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Experiments/Tango.RemoteDesktop/Tango.ScreenCapture/CaptureRegion.cs')
-rw-r--r--Software/Experiments/Tango.RemoteDesktop/Tango.ScreenCapture/CaptureRegion.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/Software/Experiments/Tango.RemoteDesktop/Tango.ScreenCapture/CaptureRegion.cs b/Software/Experiments/Tango.RemoteDesktop/Tango.ScreenCapture/CaptureRegion.cs
new file mode 100644
index 000000000..69f29ed03
--- /dev/null
+++ b/Software/Experiments/Tango.RemoteDesktop/Tango.ScreenCapture/CaptureRegion.cs
@@ -0,0 +1,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);
+ }
+ }
+}