fixed #748: Added webpage capture using IE rendering

This commit is contained in:
Jaex 2015-06-26 11:10:27 +03:00
parent 5a395ed5bc
commit 773b626d2b
13 changed files with 3508 additions and 2681 deletions

View file

@ -0,0 +1,172 @@
namespace ShareX.ScreenCaptureLib
{
partial class WebpageCaptureForm
{
/// <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();
if (webpageCapture != null)
{
webpageCapture.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(WebpageCaptureForm));
this.txtURL = new System.Windows.Forms.TextBox();
this.lblURL = new System.Windows.Forms.Label();
this.btnCapture = new System.Windows.Forms.Button();
this.pbResult = new System.Windows.Forms.PictureBox();
this.pResult = new System.Windows.Forms.Panel();
this.lblWebpageSize = new System.Windows.Forms.Label();
this.nudWebpageWidth = new System.Windows.Forms.NumericUpDown();
this.nudWebpageHeight = new System.Windows.Forms.NumericUpDown();
this.lblWebpageX = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pbResult)).BeginInit();
this.pResult.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudWebpageWidth)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudWebpageHeight)).BeginInit();
this.SuspendLayout();
//
// txtURL
//
resources.ApplyResources(this.txtURL, "txtURL");
this.txtURL.Name = "txtURL";
this.txtURL.TextChanged += new System.EventHandler(this.txtURL_TextChanged);
//
// lblURL
//
resources.ApplyResources(this.lblURL, "lblURL");
this.lblURL.Name = "lblURL";
//
// btnCapture
//
resources.ApplyResources(this.btnCapture, "btnCapture");
this.btnCapture.Name = "btnCapture";
this.btnCapture.UseVisualStyleBackColor = true;
this.btnCapture.Click += new System.EventHandler(this.btnCapture_Click);
//
// pbResult
//
this.pbResult.BackColor = System.Drawing.Color.White;
resources.ApplyResources(this.pbResult, "pbResult");
this.pbResult.Name = "pbResult";
this.pbResult.TabStop = false;
//
// pResult
//
resources.ApplyResources(this.pResult, "pResult");
this.pResult.BackColor = System.Drawing.Color.White;
this.pResult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pResult.Controls.Add(this.pbResult);
this.pResult.Name = "pResult";
//
// lblWebpageSize
//
resources.ApplyResources(this.lblWebpageSize, "lblWebpageSize");
this.lblWebpageSize.Name = "lblWebpageSize";
//
// nudWebpageWidth
//
resources.ApplyResources(this.nudWebpageWidth, "nudWebpageWidth");
this.nudWebpageWidth.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.nudWebpageWidth.Minimum = new decimal(new int[] {
100,
0,
0,
0});
this.nudWebpageWidth.Name = "nudWebpageWidth";
this.nudWebpageWidth.Value = new decimal(new int[] {
1920,
0,
0,
0});
//
// nudWebpageHeight
//
resources.ApplyResources(this.nudWebpageHeight, "nudWebpageHeight");
this.nudWebpageHeight.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.nudWebpageHeight.Minimum = new decimal(new int[] {
100,
0,
0,
0});
this.nudWebpageHeight.Name = "nudWebpageHeight";
this.nudWebpageHeight.Value = new decimal(new int[] {
1080,
0,
0,
0});
//
// lblWebpageX
//
resources.ApplyResources(this.lblWebpageX, "lblWebpageX");
this.lblWebpageX.Name = "lblWebpageX";
//
// WebpageCaptureForm
//
this.AcceptButton = this.btnCapture;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.nudWebpageHeight);
this.Controls.Add(this.lblWebpageX);
this.Controls.Add(this.nudWebpageWidth);
this.Controls.Add(this.lblWebpageSize);
this.Controls.Add(this.pResult);
this.Controls.Add(this.btnCapture);
this.Controls.Add(this.lblURL);
this.Controls.Add(this.txtURL);
this.Name = "WebpageCaptureForm";
((System.ComponentModel.ISupportInitialize)(this.pbResult)).EndInit();
this.pResult.ResumeLayout(false);
this.pResult.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudWebpageWidth)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudWebpageHeight)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtURL;
private System.Windows.Forms.Label lblURL;
private System.Windows.Forms.Button btnCapture;
private System.Windows.Forms.PictureBox pbResult;
private System.Windows.Forms.Panel pResult;
private System.Windows.Forms.Label lblWebpageSize;
private System.Windows.Forms.NumericUpDown nudWebpageWidth;
private System.Windows.Forms.NumericUpDown nudWebpageHeight;
private System.Windows.Forms.Label lblWebpageX;
}
}

View file

@ -0,0 +1,94 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright © 2007-2015 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 ShareX.HelpersLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ShareX.ScreenCaptureLib
{
public partial class WebpageCaptureForm : Form
{
public bool IsBusy { get; private set; }
private WebpageCapture webpageCapture;
public WebpageCaptureForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
CheckClipboard();
nudWebpageWidth.Value = Screen.PrimaryScreen.Bounds.Width.Between((int)nudWebpageWidth.Minimum, (int)nudWebpageWidth.Maximum);
nudWebpageHeight.Value = Screen.PrimaryScreen.Bounds.Height.Between((int)nudWebpageHeight.Minimum, (int)nudWebpageHeight.Maximum);
webpageCapture = new WebpageCapture();
webpageCapture.CaptureCompleted += webpageCapture_CaptureCompleted;
}
private void CheckClipboard()
{
if (Clipboard.ContainsText())
{
string text = Clipboard.GetText();
if (!string.IsNullOrEmpty(text) && URLHelpers.IsValidURLRegex(text))
{
txtURL.Text = text;
}
}
}
private void btnCapture_Click(object sender, EventArgs e)
{
IsBusy = true;
btnCapture.Enabled = txtURL.Enabled = !IsBusy;
if (pbResult.Image != null)
{
pbResult.Image.Dispose();
pbResult.Image = null;
}
webpageCapture.CapturePage(txtURL.Text, new Size((int)nudWebpageWidth.Value, (int)nudWebpageWidth.Value));
}
private void webpageCapture_CaptureCompleted(Bitmap bmp)
{
pbResult.Image = bmp;
IsBusy = false;
btnCapture.Enabled = txtURL.Enabled = !IsBusy;
}
private void txtURL_TextChanged(object sender, EventArgs e)
{
btnCapture.Enabled = txtURL.TextLength > 0;
}
}
}

View file

@ -0,0 +1,375 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtURL.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="txtURL.Location" type="System.Drawing.Point, System.Drawing">
<value>48, 8</value>
</data>
<data name="txtURL.Size" type="System.Drawing.Size, System.Drawing">
<value>824, 20</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtURL.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;txtURL.Name" xml:space="preserve">
<value>txtURL</value>
</data>
<data name="&gt;&gt;txtURL.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtURL.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;txtURL.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="lblURL.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblURL.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 12</value>
</data>
<data name="lblURL.Size" type="System.Drawing.Size, System.Drawing">
<value>32, 13</value>
</data>
<data name="lblURL.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="lblURL.Text" xml:space="preserve">
<value>URL:</value>
</data>
<data name="&gt;&gt;lblURL.Name" xml:space="preserve">
<value>lblURL</value>
</data>
<data name="&gt;&gt;lblURL.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblURL.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblURL.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="btnCapture.Location" type="System.Drawing.Point, System.Drawing">
<value>249, 35</value>
</data>
<data name="btnCapture.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 23</value>
</data>
<data name="btnCapture.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="btnCapture.Text" xml:space="preserve">
<value>Capture</value>
</data>
<data name="&gt;&gt;btnCapture.Name" xml:space="preserve">
<value>btnCapture</value>
</data>
<data name="&gt;&gt;btnCapture.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnCapture.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnCapture.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="pbResult.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="pbResult.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 100</value>
</data>
<data name="pbResult.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="pbResult.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;pbResult.Name" xml:space="preserve">
<value>pbResult</value>
</data>
<data name="&gt;&gt;pbResult.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pbResult.Parent" xml:space="preserve">
<value>pResult</value>
</data>
<data name="&gt;&gt;pbResult.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="pResult.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="pResult.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="pResult.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 64</value>
</data>
<data name="pResult.Size" type="System.Drawing.Size, System.Drawing">
<value>864, 592</value>
</data>
<data name="pResult.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;pResult.Name" xml:space="preserve">
<value>pResult</value>
</data>
<data name="&gt;&gt;pResult.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pResult.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pResult.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="lblWebpageSize.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblWebpageSize.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 40</value>
</data>
<data name="lblWebpageSize.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 13</value>
</data>
<data name="lblWebpageSize.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="lblWebpageSize.Text" xml:space="preserve">
<value>Browser size:</value>
</data>
<data name="&gt;&gt;lblWebpageSize.Name" xml:space="preserve">
<value>lblWebpageSize</value>
</data>
<data name="&gt;&gt;lblWebpageSize.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblWebpageSize.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblWebpageSize.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="nudWebpageWidth.Location" type="System.Drawing.Point, System.Drawing">
<value>88, 36</value>
</data>
<data name="nudWebpageWidth.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 20</value>
</data>
<data name="nudWebpageWidth.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="nudWebpageWidth.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
<value>Center</value>
</data>
<data name="&gt;&gt;nudWebpageWidth.Name" xml:space="preserve">
<value>nudWebpageWidth</value>
</data>
<data name="&gt;&gt;nudWebpageWidth.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;nudWebpageWidth.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;nudWebpageWidth.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="nudWebpageHeight.Location" type="System.Drawing.Point, System.Drawing">
<value>176, 36</value>
</data>
<data name="nudWebpageHeight.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 20</value>
</data>
<data name="nudWebpageHeight.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="nudWebpageHeight.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
<value>Center</value>
</data>
<data name="&gt;&gt;nudWebpageHeight.Name" xml:space="preserve">
<value>nudWebpageHeight</value>
</data>
<data name="&gt;&gt;nudWebpageHeight.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;nudWebpageHeight.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;nudWebpageHeight.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="lblWebpageX.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblWebpageX.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblWebpageX.Location" type="System.Drawing.Point, System.Drawing">
<value>159, 40</value>
</data>
<data name="lblWebpageX.Size" type="System.Drawing.Size, System.Drawing">
<value>12, 13</value>
</data>
<data name="lblWebpageX.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="lblWebpageX.Text" xml:space="preserve">
<value>x</value>
</data>
<data name="&gt;&gt;lblWebpageX.Name" xml:space="preserve">
<value>lblWebpageX</value>
</data>
<data name="&gt;&gt;lblWebpageX.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblWebpageX.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblWebpageX.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>880, 664</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>ShareX - Webpage capture</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>WebpageCaptureForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View file

@ -42,8 +42,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Enums.cs" />
@ -53,6 +55,12 @@
<Compile Include="Forms\RectangleTransparent.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\WebpageCaptureForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\WebpageCaptureForm.Designer.cs">
<DependentUpon>WebpageCaptureForm.cs</DependentUpon>
</Compile>
<Compile Include="MonitorRegion.cs" />
<Compile Include="MonitorRegionDefaultCreator.cs" />
<Compile Include="RectangleAnnotateOptions.cs" />
@ -112,6 +120,7 @@
<Compile Include="Screenshot.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Screenshot_Transparent.cs" />
<Compile Include="WebpageCapture.cs" />
<Compile Include="WindowInfo.cs" />
<Compile Include="WindowsList.cs" />
<Compile Include="WindowsRectangleList.cs" />
@ -126,6 +135,9 @@
<Content Include="Resources\Crosshair.cur" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Forms\WebpageCaptureForm.resx">
<DependentUpon>WebpageCaptureForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.de.resx">
<SubType>Designer</SubType>
</EmbeddedResource>

View file

@ -0,0 +1,108 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright © 2007-2015 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 ShareX.HelpersLib;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ShareX.ScreenCaptureLib
{
public class WebpageCapture : IDisposable
{
public event Action<Bitmap> CaptureCompleted;
private WebBrowser webBrowser;
public WebpageCapture()
{
webBrowser = new WebBrowser();
webBrowser.DocumentCompleted += webBrowser_DocumentCompleted;
}
public void CapturePage(string url)
{
CapturePage(url, Screen.PrimaryScreen.Bounds.Size);
}
public void CapturePage(string url, Size browserSize)
{
if (!string.IsNullOrEmpty(url))
{
webBrowser.ScriptErrorsSuppressed = true;
webBrowser.ScrollBarsEnabled = false;
webBrowser.Size = browserSize;
webBrowser.Navigate(url);
}
}
private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
Rectangle rect = webBrowser.Document.Body.ScrollRectangle;
webBrowser.Size = new Size(rect.Width, rect.Height);
Bitmap bmp = new Bitmap(rect.Width, rect.Height);
try
{
webBrowser.DrawToBitmap(bmp, rect);
OnCaptureCompleted(bmp);
}
catch (Exception ex)
{
DebugHelper.WriteException(ex);
if (bmp != null)
{
bmp.Dispose();
}
OnCaptureCompleted(null);
}
}
protected void OnCaptureCompleted(Bitmap bmp)
{
if (CaptureCompleted != null)
{
CaptureCompleted(bmp);
}
else if (bmp != null)
{
bmp.Dispose();
}
}
public void Dispose()
{
if (webBrowser != null)
{
webBrowser.Dispose();
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1015,6 +1015,11 @@ private void tsmiAutoCapture_Click(object sender, EventArgs e)
TaskHelpers.OpenAutoCapture();
}
private void tsmiWebpageCapture_Click(object sender, EventArgs e)
{
TaskHelpers.OpenWebpageCapture();
}
private void tsbApplicationSettings_Click(object sender, EventArgs e)
{
using (ApplicationSettingsForm settingsForm = new ApplicationSettingsForm())

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -545,6 +545,16 @@ public static System.Drawing.Bitmap document_copy {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap document_globe {
get {
object obj = ResourceManager.GetObject("document-globe", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -134,6 +134,9 @@
<data name="UploadTask_CreateURLShortenerTask_Shorten_URL___0__" xml:space="preserve">
<value>Shorten URL ({0})</value>
</data>
<data name="layer_transparent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-transparent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Polygon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -162,15 +165,15 @@ Press 'No' to cancel the current upload and disable screenshot auto uploading.</
<data name="google_plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\google_plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="toolbox" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\toolbox.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="au" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\au.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScreenRecordForm_StartRecording_FFmpeg_error" xml:space="preserve">
<value>FFmpeg error</value>
</data>
<data name="checkbox_check" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\checkbox_check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScreenRecordForm_DownloaderForm_InstallRequested_FFmpeg_successfully_downloaded_" xml:space="preserve">
<value>FFmpeg successfully downloaded.</value>
</data>
@ -253,6 +256,9 @@ Please select a different hotkey or quit the conflicting application and reopen
<data name="AutoCaptureForm_Execute_Stop" xml:space="preserve">
<value>Stop</value>
</data>
<data name="RecentManager_UpdateRecentMenu_Left_click_to_copy_URL_to_clipboard__Right_click_to_open_URL_" xml:space="preserve">
<value>Left click to copy URL to clipboard. Right click to open URL.</value>
</data>
<data name="robot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\robot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -286,9 +292,6 @@ Please select a different hotkey or quit the conflicting application and reopen
<data name="application_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\application-blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="application_task" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\application-task.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TaskSettingsForm_UpdateWindowTitle_Task_settings" xml:space="preserve">
<value>Task settings</value>
</data>
@ -325,9 +328,6 @@ Would you like to automatically download it?</value>
<value>Waiting...</value>
<comment>Text must be equal or lower than 54 characters because of tray icon text length limit.</comment>
</data>
<data name="BeforeUploadForm_BeforeUploadForm__0__is_about_to_be_uploaded_to__1___You_may_choose_a_different_destination_" xml:space="preserve">
<value>{0} is about to be uploaded to {1}. You may choose a different destination.</value>
</data>
<data name="TaskSettingsForm_UpdateUploaderMenuNames_Image_uploader___0_" xml:space="preserve">
<value>Image uploader: {0}</value>
</data>
@ -343,6 +343,9 @@ Would you like to automatically download it?</value>
<data name="MainForm_UpdateMenu_Hide_menu" xml:space="preserve">
<value>Hide menu</value>
</data>
<data name="monitor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\monitor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="navigation_000_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\navigation-000-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -364,6 +367,9 @@ Would you like to automatically download it?</value>
<data name="ActionsForm_btnOK_Click_File_path_can_t_be_empty_" xml:space="preserve">
<value>File path can't be empty.</value>
</data>
<data name="TaskHelpers_OpenFTPClient_Unable_to_find_valid_FTP_account_" xml:space="preserve">
<value>Unable to find valid FTP account.</value>
</data>
<data name="UploadTask_DoAfterCaptureJobs_Choose_a_folder_to_save" xml:space="preserve">
<value>Choose a folder to save</value>
</data>
@ -391,9 +397,6 @@ Would you like to automatically download it?</value>
<data name="folder_tree" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder-tree.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TaskManager_task_UploadCompleted_Error" xml:space="preserve">
<value>Error</value>
</data>
@ -422,9 +425,6 @@ here</value>
<data name="GitHub" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GitHub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="clipboard_list" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clipboard-list.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="traffic_cone" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\traffic-cone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -469,6 +469,12 @@ Please run ShareX as administrator to change personal folder path.</value>
<data name="navigation_090_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\navigation-090-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TaskHelpers_OpenFTPClient_FTP_client_only_supports_FTP_or_FTPS_" xml:space="preserve">
<value>FTP client only supports FTP or FTPS.</value>
</data>
<data name="layers_arrange" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layers-arrange.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WatchFolderForm_btnPathBrowse_Click_Choose_folder_path" xml:space="preserve">
<value>Choose folder path</value>
</data>
@ -482,6 +488,9 @@ Would you like to restart ShareX?</value>
<data name="layer_shape" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="eraser" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\eraser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="image_pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\image--pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -494,6 +503,12 @@ Would you like to restart ShareX?</value>
<data name="cn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="kr" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\kr.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="categories" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\categories.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FileExistForm_txtNewName_TextChanged_Use_new_name__" xml:space="preserve">
<value>Use new name: </value>
</data>
@ -515,6 +530,9 @@ Would you like to restart ShareX?</value>
<data name="ScreenRecordForm_StartRecording_Missing" xml:space="preserve">
<value>Missing</value>
</data>
<data name="nl" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\nl.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TaskSettingsForm_ConfigureEncoder_Configure_CLI_video_encoders_____" xml:space="preserve">
<value>Configure CLI video encoders ---&gt;</value>
</data>
@ -554,9 +572,6 @@ Would you like to restart ShareX?</value>
<data name="clipboard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clipboard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="barcode_2d" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\barcode-2d.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Program_Run_Unable_to_create_folder_" xml:space="preserve">
<value>Unable to create folder:</value>
</data>
@ -572,6 +587,12 @@ Would you like to restart ShareX?</value>
<data name="arrow_090" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow-090.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MainForm_AfterShownJobs_You_can_middle_click_the_ShareX_tray_icon_to_start_rectangle_capture_" xml:space="preserve">
<value>You can middle click the ShareX tray icon to start rectangle capture.</value>
</data>
<data name="clipboard_list" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clipboard-list.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layout_select_content" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layout-select-content.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -594,9 +615,6 @@ Would you like to restart ShareX?</value>
<value>Download failed:
{0}</value>
</data>
<data name="TaskSettingsForm_UpdateUploaderMenuNames_After_upload___0_" xml:space="preserve">
<value>After upload: {0}</value>
</data>
<data name="layer_shape_ellipse" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape-ellipse.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -609,11 +627,14 @@ Would you like to restart ShareX?</value>
<data name="UploadTask_Prepare_Preparing" xml:space="preserve">
<value>Preparing</value>
</data>
<data name="es" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\es.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layer_shape_polygon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape-polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="checkbox_check" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\checkbox_check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="toolbox" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\toolbox.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UploadTask_OnUploadCompleted_Stopped" xml:space="preserve">
<value>Stopped</value>
@ -636,6 +657,9 @@ Would you like to restart ShareX?</value>
<data name="wrench_screwdriver" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wrench-screwdriver.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="application_browser" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\application-browser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ErrorSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ErrorSound.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
@ -645,8 +669,8 @@ Would you like to restart ShareX?</value>
<data name="MainForm_tsmiTestTextUpload_Click_Text_upload_test" xml:space="preserve">
<value>Text upload test</value>
</data>
<data name="application_browser" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\application-browser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="application_task" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\application-task.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="notebook" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\notebook.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -672,20 +696,23 @@ Would you like to restart ShareX?</value>
<data name="RoundedRectangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\RoundedRectangle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="monitor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\monitor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="TaskHelpers_TweetMessage_Unable_to_find_valid_Twitter_account_" xml:space="preserve">
<value>Unable to find valid Twitter account.</value>
</data>
<data name="BeforeUploadForm_BeforeUploadForm__0__is_about_to_be_uploaded_to__1___You_may_choose_a_different_destination_" xml:space="preserve">
<value>{0} is about to be uploaded to {1}. You may choose a different destination.</value>
</data>
<data name="AboutForm_AboutForm_Website" xml:space="preserve">
<value>Website</value>
</data>
<data name="categories" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\categories.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layers_arrange" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layers-arrange.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="TaskSettingsForm_UpdateUploaderMenuNames_After_upload___0_" xml:space="preserve">
<value>After upload: {0}</value>
</data>
<data name="eraser" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\eraser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="barcode_2d" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\barcode-2d.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScreenRecordForm_StartRecording_Click_tray_icon_to_start_recording_" xml:space="preserve">
<value>Click to start recording.</value>
@ -697,31 +724,7 @@ Would you like to restart ShareX?</value>
<data name="ScreenColorPicker_UpdateControls_Start_screen_color_picker" xml:space="preserve">
<value>Start screen color picker</value>
</data>
<data name="layer_transparent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-transparent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="kr" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\kr.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="es" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\es.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TaskHelpers_OpenFTPClient_FTP_client_only_supports_FTP_or_FTPS_" xml:space="preserve">
<value>FTP client only supports FTP or FTPS.</value>
</data>
<data name="TaskHelpers_OpenFTPClient_Unable_to_find_valid_FTP_account_" xml:space="preserve">
<value>Unable to find valid FTP account.</value>
</data>
<data name="TaskHelpers_TweetMessage_Unable_to_find_valid_Twitter_account_" xml:space="preserve">
<value>Unable to find valid Twitter account.</value>
</data>
<data name="nl" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\nl.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MainForm_AfterShownJobs_You_can_middle_click_the_ShareX_tray_icon_to_start_rectangle_capture_" xml:space="preserve">
<value>You can middle click the ShareX tray icon to start rectangle capture.</value>
</data>
<data name="RecentManager_UpdateRecentMenu_Left_click_to_copy_URL_to_clipboard__Right_click_to_open_URL_" xml:space="preserve">
<value>Left click to copy URL to clipboard. Right click to open URL.</value>
<data name="document-globe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\document-globe.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

View file

@ -920,6 +920,7 @@
<None Include="Resources\kr.png" />
<None Include="Resources\es.png" />
<None Include="Resources\nl.png" />
<None Include="Resources\document-globe.png" />
<Content Include="ShareX_Icon.ico" />
<None Include="Resources\globe--pencil.png" />
<None Include="Resources\camcorder--pencil.png" />

View file

@ -499,6 +499,11 @@ public static void OpenAutoCapture()
AutoCaptureForm.Instance.ShowActivate();
}
public static void OpenWebpageCapture()
{
new WebpageCaptureForm().Show();
}
public static void StartAutoCapture()
{
if (!AutoCaptureForm.IsRunning)