Rectangle (Windows) is now (Objects)

This commit is contained in:
Jaex 2014-07-10 00:44:08 +03:00
parent 78436ac0a9
commit f352149ed1
8 changed files with 643 additions and 1323 deletions

View file

@ -131,12 +131,13 @@ public override void Prepare()
if (Config != null)
{
AreaManager.WindowCaptureMode |= Config.ForceWindowCapture;
AreaManager.IncludeControls |= Config.IncludeControls;
if (AreaManager.WindowCaptureMode)
{
WindowsListAdvanced wla = new WindowsListAdvanced();
wla.IgnoreWindows.Add(Handle);
wla.IncludeChildWindows = Config.IncludeControls;
wla.IncludeChildWindows = AreaManager.IncludeControls;
AreaManager.Windows = wla.GetWindowsRectangleList();
}
}

View file

@ -1,246 +0,0 @@
namespace ScreenCaptureLib
{
partial class RegionCapturePreview
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegionCapturePreview));
this.tsRegionTools = new System.Windows.Forms.ToolStrip();
this.tsbFullscreen = new System.Windows.Forms.ToolStripButton();
this.tsbWindowRectangle = new System.Windows.Forms.ToolStripButton();
this.tsbRectangle = new System.Windows.Forms.ToolStripButton();
this.tsbRoundedRectangle = new System.Windows.Forms.ToolStripButton();
this.tsbEllipse = new System.Windows.Forms.ToolStripButton();
this.tsbTriangle = new System.Windows.Forms.ToolStripButton();
this.tsbDiamond = new System.Windows.Forms.ToolStripButton();
this.tsbPolygon = new System.Windows.Forms.ToolStripButton();
this.tsbFreeHand = new System.Windows.Forms.ToolStripButton();
this.tsbLastRegion = new System.Windows.Forms.ToolStripButton();
this.pbResult = new System.Windows.Forms.PictureBox();
this.pImage = new System.Windows.Forms.Panel();
this.pgSurfaceConfig = new System.Windows.Forms.PropertyGrid();
this.btnClipboardCopy = new System.Windows.Forms.Button();
this.tsRegionTools.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbResult)).BeginInit();
this.pImage.SuspendLayout();
this.SuspendLayout();
//
// tsRegionTools
//
this.tsRegionTools.AutoSize = false;
this.tsRegionTools.Dock = System.Windows.Forms.DockStyle.None;
this.tsRegionTools.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbFullscreen,
this.tsbWindowRectangle,
this.tsbRectangle,
this.tsbRoundedRectangle,
this.tsbEllipse,
this.tsbTriangle,
this.tsbDiamond,
this.tsbPolygon,
this.tsbFreeHand,
this.tsbLastRegion});
this.tsRegionTools.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
this.tsRegionTools.Location = new System.Drawing.Point(8, 8);
this.tsRegionTools.Name = "tsRegionTools";
this.tsRegionTools.Padding = new System.Windows.Forms.Padding(10, 10, 1, 0);
this.tsRegionTools.ShowItemToolTips = false;
this.tsRegionTools.Size = new System.Drawing.Size(168, 248);
this.tsRegionTools.TabIndex = 0;
this.tsRegionTools.Text = "toolStrip1";
//
// tsbFullscreen
//
this.tsbFullscreen.Image = ((System.Drawing.Image)(resources.GetObject("tsbFullscreen.Image")));
this.tsbFullscreen.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbFullscreen.Name = "tsbFullscreen";
this.tsbFullscreen.Size = new System.Drawing.Size(80, 20);
this.tsbFullscreen.Text = "Fullscreen";
this.tsbFullscreen.Click += new System.EventHandler(this.tsbFullscreen_Click);
//
// tsbWindowRectangle
//
this.tsbWindowRectangle.Image = ((System.Drawing.Image)(resources.GetObject("tsbWindowRectangle.Image")));
this.tsbWindowRectangle.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbWindowRectangle.Name = "tsbWindowRectangle";
this.tsbWindowRectangle.Size = new System.Drawing.Size(149, 20);
this.tsbWindowRectangle.Text = "Window and Rectangle";
this.tsbWindowRectangle.Click += new System.EventHandler(this.tsbWindowRectangle_Click);
//
// tsbRectangle
//
this.tsbRectangle.Image = ((System.Drawing.Image)(resources.GetObject("tsbRectangle.Image")));
this.tsbRectangle.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRectangle.Name = "tsbRectangle";
this.tsbRectangle.Size = new System.Drawing.Size(79, 20);
this.tsbRectangle.Text = "Rectangle";
this.tsbRectangle.Click += new System.EventHandler(this.tsbRectangle_Click);
//
// tsbRoundedRectangle
//
this.tsbRoundedRectangle.Image = ((System.Drawing.Image)(resources.GetObject("tsbRoundedRectangle.Image")));
this.tsbRoundedRectangle.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRoundedRectangle.Name = "tsbRoundedRectangle";
this.tsbRoundedRectangle.Size = new System.Drawing.Size(130, 20);
this.tsbRoundedRectangle.Text = "Rounded Rectangle";
this.tsbRoundedRectangle.Click += new System.EventHandler(this.tsbRoundedRectangle_Click);
//
// tsbEllipse
//
this.tsbEllipse.Image = ((System.Drawing.Image)(resources.GetObject("tsbEllipse.Image")));
this.tsbEllipse.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbEllipse.Name = "tsbEllipse";
this.tsbEllipse.Size = new System.Drawing.Size(60, 20);
this.tsbEllipse.Text = "Ellipse";
this.tsbEllipse.Click += new System.EventHandler(this.tsbEllipse_Click);
//
// tsbTriangle
//
this.tsbTriangle.Image = ((System.Drawing.Image)(resources.GetObject("tsbTriangle.Image")));
this.tsbTriangle.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbTriangle.Name = "tsbTriangle";
this.tsbTriangle.Size = new System.Drawing.Size(70, 20);
this.tsbTriangle.Text = "Triangle";
this.tsbTriangle.Click += new System.EventHandler(this.tsbTriangle_Click);
//
// tsbDiamond
//
this.tsbDiamond.Image = ((System.Drawing.Image)(resources.GetObject("tsbDiamond.Image")));
this.tsbDiamond.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbDiamond.Name = "tsbDiamond";
this.tsbDiamond.Size = new System.Drawing.Size(76, 20);
this.tsbDiamond.Text = "Diamond";
this.tsbDiamond.Click += new System.EventHandler(this.tsbDiamond_Click);
//
// tsbPolygon
//
this.tsbPolygon.Image = ((System.Drawing.Image)(resources.GetObject("tsbPolygon.Image")));
this.tsbPolygon.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbPolygon.Name = "tsbPolygon";
this.tsbPolygon.Size = new System.Drawing.Size(71, 20);
this.tsbPolygon.Text = "Polygon";
this.tsbPolygon.Click += new System.EventHandler(this.tsbPolygon_Click);
//
// tsbFreeHand
//
this.tsbFreeHand.Image = ((System.Drawing.Image)(resources.GetObject("tsbFreeHand.Image")));
this.tsbFreeHand.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbFreeHand.Name = "tsbFreeHand";
this.tsbFreeHand.Size = new System.Drawing.Size(81, 20);
this.tsbFreeHand.Text = "Free Hand";
this.tsbFreeHand.Click += new System.EventHandler(this.tsbFreeHand_Click);
//
// tsbLastRegion
//
this.tsbLastRegion.Image = ((System.Drawing.Image)(resources.GetObject("tsbLastRegion.Image")));
this.tsbLastRegion.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbLastRegion.Name = "tsbLastRegion";
this.tsbLastRegion.Size = new System.Drawing.Size(88, 20);
this.tsbLastRegion.Text = "Last Region";
this.tsbLastRegion.Click += new System.EventHandler(this.tsbLastRegion_Click);
//
// pbResult
//
this.pbResult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pbResult.Location = new System.Drawing.Point(0, 0);
this.pbResult.Name = "pbResult";
this.pbResult.Size = new System.Drawing.Size(500, 500);
this.pbResult.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pbResult.TabIndex = 1;
this.pbResult.TabStop = false;
//
// pImage
//
this.pImage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pImage.AutoScroll = true;
this.pImage.Controls.Add(this.pbResult);
this.pImage.Location = new System.Drawing.Point(304, 8);
this.pImage.Name = "pImage";
this.pImage.Size = new System.Drawing.Size(536, 632);
this.pImage.TabIndex = 3;
//
// pgSurfaceConfig
//
this.pgSurfaceConfig.Location = new System.Drawing.Point(8, 264);
this.pgSurfaceConfig.Name = "pgSurfaceConfig";
this.pgSurfaceConfig.PropertySort = System.Windows.Forms.PropertySort.NoSort;
this.pgSurfaceConfig.Size = new System.Drawing.Size(288, 376);
this.pgSurfaceConfig.TabIndex = 2;
this.pgSurfaceConfig.ToolbarVisible = false;
//
// btnClipboardCopy
//
this.btnClipboardCopy.Location = new System.Drawing.Point(184, 8);
this.btnClipboardCopy.Name = "btnClipboardCopy";
this.btnClipboardCopy.Size = new System.Drawing.Size(112, 40);
this.btnClipboardCopy.TabIndex = 1;
this.btnClipboardCopy.Text = "Copy image to clipboard";
this.btnClipboardCopy.UseVisualStyleBackColor = true;
this.btnClipboardCopy.Click += new System.EventHandler(this.btnClipboardCopy_Click);
//
// RegionCapturePreview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(849, 649);
this.Controls.Add(this.btnClipboardCopy);
this.Controls.Add(this.pImage);
this.Controls.Add(this.pgSurfaceConfig);
this.Controls.Add(this.tsRegionTools);
this.Name = "RegionCapturePreview";
this.Text = "Region Capture";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.RegionCapturePreview_FormClosing);
this.tsRegionTools.ResumeLayout(false);
this.tsRegionTools.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbResult)).EndInit();
this.pImage.ResumeLayout(false);
this.pImage.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ToolStrip tsRegionTools;
private System.Windows.Forms.ToolStripButton tsbFreeHand;
private System.Windows.Forms.ToolStripButton tsbEllipse;
private System.Windows.Forms.ToolStripButton tsbRectangle;
private System.Windows.Forms.ToolStripButton tsbRoundedRectangle;
private System.Windows.Forms.ToolStripButton tsbTriangle;
private System.Windows.Forms.ToolStripButton tsbPolygon;
private System.Windows.Forms.PictureBox pbResult;
private System.Windows.Forms.ToolStripButton tsbDiamond;
private System.Windows.Forms.ToolStripButton tsbFullscreen;
private System.Windows.Forms.Panel pImage;
private System.Windows.Forms.Button btnClipboardCopy;
private System.Windows.Forms.ToolStripButton tsbWindowRectangle;
private System.Windows.Forms.ToolStripButton tsbLastRegion;
private System.Windows.Forms.PropertyGrid pgSurfaceConfig;
}
}

View file

@ -1,182 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (C) 2007-2014 ShareX Developers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using HelpersLib;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace ScreenCaptureLib
{
public partial class RegionCapturePreview : Form
{
public Image Result
{
get
{
return result;
}
private set
{
result = value;
if (result != null)
{
pbResult.Image = result;
Text = string.Format("Region Capture: {0}x{1}", result.Width, result.Height);
}
}
}
public SurfaceOptions SurfaceConfig { get; set; }
private Image screenshot;
private Image result;
public RegionCapturePreview()
: this(new SurfaceOptions())
{
}
public RegionCapturePreview(SurfaceOptions surfaceConfig)
{
InitializeComponent();
screenshot = Screenshot.CaptureFullscreen();
SurfaceConfig = surfaceConfig;
pgSurfaceConfig.SelectedObject = SurfaceConfig;
}
private void CaptureRegion(Surface surface)
{
pbResult.Image = null;
try
{
surface.Config = SurfaceConfig;
surface.SurfaceImage = screenshot;
surface.Prepare();
surface.ShowDialog();
if (surface.Result == SurfaceResult.Region)
{
Result = surface.GetRegionImage();
}
else if (surface.Result == SurfaceResult.Fullscreen)
{
Result = screenshot;
}
}
finally
{
surface.Dispose();
}
}
private void CaptureLastRegion()
{
if (Surface.LastRegionFillPath != null)
{
Result = ShapeCaptureHelpers.GetRegionImage(screenshot, Surface.LastRegionFillPath, Surface.LastRegionDrawPath, SurfaceConfig);
}
else
{
CaptureRegion(new RectangleRegion());
}
}
private void tsbFullscreen_Click(object sender, EventArgs e)
{
Result = screenshot;
}
private void tsbWindowRectangle_Click(object sender, EventArgs e)
{
RectangleRegion rectangleRegion = new RectangleRegion();
rectangleRegion.AreaManager.WindowCaptureMode = true;
CaptureRegion(rectangleRegion);
}
private void tsbRectangle_Click(object sender, EventArgs e)
{
CaptureRegion(new RectangleRegion());
}
private void tsbRoundedRectangle_Click(object sender, EventArgs e)
{
CaptureRegion(new RoundedRectangleRegion());
}
private void tsbEllipse_Click(object sender, EventArgs e)
{
CaptureRegion(new EllipseRegion());
}
private void tsbTriangle_Click(object sender, EventArgs e)
{
CaptureRegion(new TriangleRegion());
}
private void tsbDiamond_Click(object sender, EventArgs e)
{
CaptureRegion(new DiamondRegion());
}
private void tsbPolygon_Click(object sender, EventArgs e)
{
CaptureRegion(new PolygonRegion());
}
private void tsbFreeHand_Click(object sender, EventArgs e)
{
CaptureRegion(new FreeHandRegion());
}
private void tsbLastRegion_Click(object sender, EventArgs e)
{
CaptureLastRegion();
}
private void RegionCapturePreview_FormClosing(object sender, FormClosingEventArgs e)
{
if (Result != null)
{
DialogResult = DialogResult.OK;
}
else
{
DialogResult = DialogResult.Cancel;
}
}
private void btnClipboardCopy_Click(object sender, EventArgs e)
{
if (Result != null)
{
ClipboardHelpers.CopyImage(Result);
}
}
}
}

View file

@ -1,230 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="tsRegionTools.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbFullscreen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEaSURBVDhPpZHdasJAEIV9WF/Jd+mNFyIIUlor/hTxp0Gk
WjGaxGwSd2NGzy6jG5N4YQeGgSTfmTkntXrDpf+0Fni1cgKs+EzQ/kaqTM+CQFWds4xUaiB0GKdFAXva
BTCRZ/0uiAzoBiovYJf9DKeKxMCHUGlw60naHGS1ABfDvkhv4HovabU70XJ7ei7wCGOjARP62SQ0+42r
BeC5DHb+DDhZxTReRuUCSBuBIaxHeHqFAQ6diPoLUS7AvwqBwTPDeAZ44AjqzQW9T8O8ACa2Y/J2BAbP
OJtP/pwZsPN9LAqg4d2ztiMweMbZ2MzftQZBuQCaveNX8Xb2zN388vXMZcDh7Xx1887bcXp3cqT2KNDw
24d3F3i9XboA/bSEOiL2OBcAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbWindowRectangle.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD2SURBVDhPzVLZisJAEMzH7i/5Ly4+LIgsCCqIB7KKeAdd
EmNMYk5LqoeJBjGC+7A2FPVUR/eM8R7zUbHwCnLxs8myM5L0LKIozoSDSPHL6RoPGzCRKccgheMlsN0E
OycWbPcKBYNb1jXLsNiFwncNKPZOKpVpph1j9Rthvg0xNUNMNif8rBUKBmR9KIrJZejPfOHcgJfmzgc/
leSNpVKZOFoGIuhOfXQmHtpjhYIBmQcjsza5DN9DV1gMdLremztzXyYzlWnN0RGNgYt674CvrkJuwN15
OD6VaavqPBJrs7IWU1TrOPhsO6i29leDv0C+8z+OYVwAsdx73hsdYZoAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbRectangle.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEQSURBVDhPxZNbSwJBAIX3x/aX+i9GD0FIEKQg5YUSycxE
y1y33XVnL578ZhpDuvjggwPnbb/znRnY4Pjn5HSuQ2IL9p2qWqso1zJ5ZZMal70FgB6IV6WitNQyKRXG
hc2/BRgBgfh4HhWahbnNdOHyZwHWJHM2D07ejcZvRqNXo6dZZvNrATBzsTow1/MGGk4zDSaZ+i8r3Y9d
fhQwG7OHMWICBOiNUrWHqe4eE5udAh6MOzPbw1gxAgK0Boma/ViNB5edAqbzYNyZ2ZiBuxvYg9e9D5ur
TmSzLfB2P507MxszMDbAejvS5e1SFy2XbQF35+Gc3U3nzsz2ZmCg82aos0ao2s3iu+CQfP0RRztB8AmT
TaydC0wRpgAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbRoundedRectangle.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE7SURBVDhPzZJbS8NAEIXzX/UnKf4YHwRRUcRK1Wq1pVpr
G3pJzD3ZXHqcs0kIwRT62IHztPvNOTO7xmHV8amFfVRdb+roZHPGg11VFFtk+RYqLZCIeJdMhZfOXUVQ
ZQUiVSCIc3hRDjfM4QRZk2QXTMdYQF8gAraXYe2mWDkplr+ldJOuBqm4hknpZglIyLQV5huF2Vrhe5Vo
dTbQsMSlKx1NO8WPQNNlgomZYLyIMZqX+teAselcwwurdCP4IcBwFmEwjfDyFWq1GnBhnJmxa5iudCRI
oD8J8TgO8DAq1WrAbXNhnJmx6Uz4TeCnzxA9Ae/ffdwOfdy8elq6Qf0SfCpG58I4M2PTmTDd7gS8Hni4
fHZx0XcbmFV/JD4Vt83onJmx6Uz4SmCC5z1Hw62PVBcP9lF1/SDKMP4AhPNmC1XxgMAAAAAASUVORK5C
YII=
</value>
</data>
<data name="tsbEllipse.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE2SURBVDhPtZFtS8JgFIb3Y/tL/Y4gIuhDUFCIKNKblZVh
JVli2TY39+J2y7XtQTddn+rA+eDOc933fY7Wv9TO7pe2dTGuL/NwWyVp+rtQLZikCuNUfpDInSeyvcWm
SB1sQMdfaOouNLFjjX9ifUyjskhVgLhBlDsCAo2+Iw0nkV7GoQaf4UqgDsZ14uAWZyBQfxSqNwyyvnsL
cpGqwDqMK44G7L7OdTWY6+LZV6fvbwqwM7HX4af33A0QqPXgqdnz1Lj3ygJcm4OxM7ENjCuO7Uc/g866
M53ezHRy7ZbvgDvRORg7ExtnYFzPb4FmOr50ddRxVjDFD+NOdA7GzsTGOYdz8LDtaL9plwUoPvA/G3ei
szOxcQY+aNnaa2yBTTGgjTvR2ZnYOJt58by+zMNqF+O/LMtaAuHzdgQfy7+mAAAAAElFTkSuQmCC
</value>
</data>
<data name="tsbTriangle.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADPSURBVDhPtY/LCoJQFEX92H6pr2jUsFEQQUHUIAShHAiS
YaGm5uv62HHMWzd7qrThDM5grX2O9Nf0+hZoqrV5OgkI5Gkl6SQQYZ5GkrogzYrfBXU4Zjn8MIPtp79J
REGU5HCDDIcTw85KvgtEmJoJNh0G/ZhANWIoevRZwgX0M51NzQRvjQiyFmKlBu8FYjudTj/T2dTM4Zni
YyJ7ryVckOX3ds28ns3h8drDaOk+C8R2lhbl73ub3doXm3PZTPBw7mAwtR8ltLSZCu8SSboAnYWHB3Fj
2MsAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbDiamond.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADiSURBVDhPtZDrCoJAFIR92F6ptwn6UxAUEUVRWXQhwyJJ
zMt6yYnRFrqobUED58fCfjNzjvZX1eoWOPfndyIo9bXJIyylbFIEU8k1/WxSBMdJCj+8wvET2G5SblIE
iygHLSeGeY5gWBF2p/DdpAhmKhMPdg6tTIHFXmC2C7J5Mnk1YDJhpm6OIXRDYLINMFz56C+9bEpbcGfW
ZjJhpo3WPnq6h87URXviVt+B1bkzazOZcHfuoTW+oDl0ymEpfmB17szaTCbcGCjAUvzIg3Fn1lZKfhUB
Hqty508i+DOsJk27AfJjkdIO7Gs3AAAAAElFTkSuQmCC
</value>
</data>
<data name="tsbPolygon.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADGSURBVDhPtY/NCoJAFIXtXXul3qZFq9oEQi4spIxKCitJ
TUfHxpOXURDp5xr0bWYW5zv3XuPvDEdX1N/+kEzQ27uokduwi7qyKkvIokQmFZJMfS7qyiSSFKWP7xu0
ZaX0RJZIdGWRK4SJlisGdew97QKaTLJ/k/wCgsJ0M619Dgt4lxybU8Y7oYGCQVzgGEi4lbw6CCzcFHPn
zi+i0M7P4XgC1lbLUzvGxIowNkNeEQXsvYC5TjBbapkltqFwr9Vf8bPIwzCecFtFfbG7ZeoAAAAASUVO
RK5CYII=
</value>
</data>
<data name="tsbFreeHand.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADnSURBVDhPrZLbCoJAEIZ92F6pt+mmi27qoqIQopOIhEmS
mof1OPG7u4S44Ur9MDC78s3s/KPxN02mPo0JgXHhQkd101BZNVSUTbfIUAEJsqKmhNUUZ5X6FToRxCX5
UdnmAh0ngO6z6BeQHYbCeeRke3mbC7TvAUzCrGFStc9FRw4yurqMTrfsewGYpYKtOwcPTkamnaoLwG3k
OiFQLlxAvQ+6Aoju2LPsMBQC5cKFnB179gI+NwzDzHsrpfU5oeUhpoX5ovku6hbBAc7jD5PGYVUwDYZt
Lwmtjh94tgnVrxgTAvtVhvEG3bAu+JY1oRgAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbLastRegion.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEQSURBVDhPxZNbSwJBAIX3x/aX+i9GD0FIEKQg5YUSycxE
y1y33XVnL578ZhpDuvjggwPnbb/znRnY4Pjn5HSuQ2IL9p2qWqso1zJ5ZZMal70FgB6IV6WitNQyKRXG
hc2/BRgBgfh4HhWahbnNdOHyZwHWJHM2D07ejcZvRqNXo6dZZvNrATBzsTow1/MGGk4zDSaZ+i8r3Y9d
fhQwG7OHMWICBOiNUrWHqe4eE5udAh6MOzPbw1gxAgK0Boma/ViNB5edAqbzYNyZ2ZiBuxvYg9e9D5ur
TmSzLfB2P507MxszMDbAejvS5e1SFy2XbQF35+Gc3U3nzsz2ZmCg82aos0ao2s3iu+CQfP0RRztB8AmT
TaydC0wRpgAAAABJRU5ErkJggg==
</value>
</data>
</root>

View file

@ -98,6 +98,7 @@ public bool IsResizing
public List<Rectangle> Windows { get; set; }
public bool WindowCaptureMode { get; set; }
public bool IncludeControls { get; set; }
public int MinimumSize { get; set; }
private RectangleRegion surface;

View file

@ -71,12 +71,6 @@
<Compile Include="Forms\RectangleLight.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\RegionCapturePreview.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\RegionCapturePreview.Designer.cs">
<DependentUpon>RegionCapturePreview.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Surface.cs">
<SubType>Form</SubType>
</Compile>
@ -136,9 +130,6 @@
<Content Include="Resources\Crosshair.cur" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Forms\RegionCapturePreview.resx">
<DependentUpon>RegionCapturePreview.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

File diff suppressed because it is too large Load diff

View file

@ -743,11 +743,6 @@ private void tsmiTestUploaders_Click(object sender, EventArgs e)
}
}
private void tsmiTestShapeCapture_Click(object sender, EventArgs e)
{
new RegionCapturePreview(Program.DefaultTaskSettings.CaptureSettings.SurfaceOptions).Show();
}
private void tsmiScreenRecorder_Click(object sender, EventArgs e)
{
TaskHelpers.DoScreenRecorder();
@ -1568,6 +1563,7 @@ private void CaptureRegion(CaptureType captureType, TaskSettings taskSettings, b
case CaptureType.RectangleWindow:
RectangleRegion rectangleRegion = new RectangleRegion();
rectangleRegion.AreaManager.WindowCaptureMode = true;
rectangleRegion.AreaManager.IncludeControls = true;
surface = rectangleRegion;
break;
case CaptureType.RoundedRectangle: