diff --git a/HelpersLib/Forms/QRCodeForm.Designer.cs b/HelpersLib/Forms/QRCodeForm.Designer.cs
new file mode 100644
index 000000000..293b56aaf
--- /dev/null
+++ b/HelpersLib/Forms/QRCodeForm.Designer.cs
@@ -0,0 +1,64 @@
+namespace HelpersLib
+{
+ partial class QRCodeForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.qrMain = new Gma.QrCodeNet.Encoding.Windows.Forms.QrCodeGraphicControl();
+ this.SuspendLayout();
+ //
+ // qrMain
+ //
+ this.qrMain.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.qrMain.ErrorCorrectLevel = Gma.QrCodeNet.Encoding.ErrorCorrectionLevel.M;
+ this.qrMain.Location = new System.Drawing.Point(0, 0);
+ this.qrMain.Name = "qrMain";
+ this.qrMain.QuietZoneModule = Gma.QrCodeNet.Encoding.Windows.Render.QuietZoneModules.Two;
+ this.qrMain.Size = new System.Drawing.Size(384, 362);
+ this.qrMain.TabIndex = 0;
+ //
+ // QRCodeForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.White;
+ this.ClientSize = new System.Drawing.Size(384, 362);
+ this.Controls.Add(this.qrMain);
+ this.Name = "QRCodeForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "ShareX - QR code";
+ this.TopMost = true;
+ this.Resize += new System.EventHandler(this.QRCodeForm_Resize);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Gma.QrCodeNet.Encoding.Windows.Forms.QrCodeGraphicControl qrMain;
+ }
+}
\ No newline at end of file
diff --git a/HelpersLib/Forms/QRCodeForm.cs b/HelpersLib/Forms/QRCodeForm.cs
new file mode 100644
index 000000000..a77d19ef4
--- /dev/null
+++ b/HelpersLib/Forms/QRCodeForm.cs
@@ -0,0 +1,53 @@
+#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 .
+*/
+
+#endregion License Information (GPL v3)
+
+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 HelpersLib
+{
+ public partial class QRCodeForm : Form
+ {
+ public QRCodeForm(string text)
+ {
+ InitializeComponent();
+ Icon = ShareXResources.Icon;
+ Text = "QR code: " + text;
+ ClientSize = new Size(400, 400);
+ qrMain.Text = text;
+ }
+
+ private void QRCodeForm_Resize(object sender, EventArgs e)
+ {
+ qrMain.Refresh();
+ }
+ }
+}
\ No newline at end of file
diff --git a/HelpersLib/Forms/QRCodeForm.resx b/HelpersLib/Forms/QRCodeForm.resx
new file mode 100644
index 000000000..7080a7d11
--- /dev/null
+++ b/HelpersLib/Forms/QRCodeForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/HelpersLib/HelpersLib.csproj b/HelpersLib/HelpersLib.csproj
index cd1936a35..55c55b7d2 100644
--- a/HelpersLib/HelpersLib.csproj
+++ b/HelpersLib/HelpersLib.csproj
@@ -55,6 +55,9 @@
False
..\packages\AsyncBridge.Net35.0.2.0\lib\net35-Client\AsyncBridge.Net35.dll
+
+ ..\packages\QrCode.Net.0.4.0.0\lib\net35\Gma.QrCodeNet.Encoding.dll
+
False
..\packages\Newtonsoft.Json.6.0.3\lib\net35\Newtonsoft.Json.dll
@@ -92,6 +95,12 @@
+
+ Form
+
+
+ QRCodeForm.cs
+
@@ -326,6 +335,9 @@
MonitorTestForm.cs
+
+ QRCodeForm.cs
+
DownloaderForm.cs
diff --git a/HelpersLib/packages.config b/HelpersLib/packages.config
index ad8b56b4c..3ea07c716 100644
--- a/HelpersLib/packages.config
+++ b/HelpersLib/packages.config
@@ -2,5 +2,6 @@
+
\ No newline at end of file
diff --git a/ShareX/Forms/AboutForm.resx b/ShareX/Forms/AboutForm.resx
index 723db5aae..ed0d270f4 100644
--- a/ShareX/Forms/AboutForm.resx
+++ b/ShareX/Forms/AboutForm.resx
@@ -139,6 +139,7 @@ FFmpeg Windows builds: http://ffmpeg.zeranoe.com/builds
7-Zip: http://www.7-zip.org
SevenZipSharp: http://sevenzipsharp.codeplex.com
DirectShow video and audio device: https://github.com/rdp/screen-capture-recorder-to-video-windows-free
+QrCode.Net: https://qrcodenet.codeplex.com
Copyright © 2007 - 2014 ShareX Developers
diff --git a/ShareX/Forms/MainForm.Designer.cs b/ShareX/Forms/MainForm.Designer.cs
index bbb5ee594..9e820f01e 100644
--- a/ShareX/Forms/MainForm.Designer.cs
+++ b/ShareX/Forms/MainForm.Designer.cs
@@ -201,6 +201,7 @@ private void InitializeComponent()
this.tsmiTrayShow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayExit = new System.Windows.Forms.ToolStripMenuItem();
this.ssToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tsmiShowQRCode = new System.Windows.Forms.ToolStripMenuItem();
this.tsMain.SuspendLayout();
this.scMain.Panel1.SuspendLayout();
this.scMain.Panel2.SuspendLayout();
@@ -897,6 +898,7 @@ private void InitializeComponent()
this.tsmiOpen,
this.tsmiCopy,
this.tsmiShowResponse,
+ this.tsmiShowQRCode,
this.tsmiUploadSelectedFile,
this.tsmiClearList,
this.tssUploadInfo1,
@@ -907,7 +909,7 @@ private void InitializeComponent()
this.tsmiHidePreview});
this.cmsUploadInfo.Name = "cmsHistory";
this.cmsUploadInfo.ShowImageMargin = false;
- this.cmsUploadInfo.Size = new System.Drawing.Size(155, 258);
+ this.cmsUploadInfo.Size = new System.Drawing.Size(155, 302);
//
// tsmiShowErrors
//
@@ -1703,6 +1705,13 @@ private void InitializeComponent()
this.ssToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.ssToolStripMenuItem.Text = "ss";
//
+ // tsmiShowQRCode
+ //
+ this.tsmiShowQRCode.Name = "tsmiShowQRCode";
+ this.tsmiShowQRCode.Size = new System.Drawing.Size(154, 22);
+ this.tsmiShowQRCode.Text = "Show QR code";
+ this.tsmiShowQRCode.Click += new System.EventHandler(this.tsmiShowQRCode_Click);
+ //
// MainForm
//
this.AllowDrop = true;
@@ -1906,5 +1915,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem tsmiTrayImageEditor;
private System.Windows.Forms.ToolStripDropDownButton tsddbWorkflows;
private System.Windows.Forms.ToolStripMenuItem tsmiTrayWorkflows;
+ private System.Windows.Forms.ToolStripMenuItem tsmiShowQRCode;
}
}
\ No newline at end of file
diff --git a/ShareX/Forms/MainForm.cs b/ShareX/Forms/MainForm.cs
index 351fbadff..fb2b374dc 100644
--- a/ShareX/Forms/MainForm.cs
+++ b/ShareX/Forms/MainForm.cs
@@ -252,7 +252,7 @@ private void UpdateControls()
{
cmsUploadInfo.SuspendLayout();
- tsmiStopUpload.Visible = tsmiOpen.Visible = tsmiCopy.Visible = tsmiShowErrors.Visible = tsmiShowResponse.Visible =
+ tsmiStopUpload.Visible = tsmiOpen.Visible = tsmiCopy.Visible = tsmiShowErrors.Visible = tsmiShowResponse.Visible = tsmiShowQRCode.Visible =
tsmiUploadSelectedFile.Visible = tsmiClearList.Visible = tssUploadInfo1.Visible = false;
pbPreview.Reset();
uim.RefreshSelectedItems();
@@ -329,6 +329,8 @@ private void UpdateControls()
tsmiShowResponse.Visible = true;
}
+ tsmiShowQRCode.Visible = uim.SelectedItem.IsURLExist;
+
tsmiUploadSelectedFile.Visible = uim.SelectedItem.IsFileExist;
}
@@ -1111,6 +1113,11 @@ private void tsmiShowResponse_Click(object sender, EventArgs e)
uim.ShowResponse();
}
+ private void tsmiShowQRCode_Click(object sender, EventArgs e)
+ {
+ uim.ShowQRCode();
+ }
+
private void tsmiUploadSelectedFile_Click(object sender, EventArgs e)
{
uim.Upload();
diff --git a/ShareX/UploadInfoManager.cs b/ShareX/UploadInfoManager.cs
index 6bb9fd33a..ec88cb925 100644
--- a/ShareX/UploadInfoManager.cs
+++ b/ShareX/UploadInfoManager.cs
@@ -297,6 +297,11 @@ public void ShowResponse()
}
}
+ public void ShowQRCode()
+ {
+ if (IsItemSelected && SelectedItem.IsURLExist) new QRCodeForm(SelectedItem.Info.Result.URL).Show();
+ }
+
public void Upload()
{
if (IsItemSelected && SelectedItem.IsFileExist) UploadManager.UploadFile(SelectedItem.Info.FilePath);