diff --git a/GreenshotQiniuPlugin/Forms/QiniuForm.cs b/GreenshotQiniuPlugin/Forms/QiniuForm.cs new file mode 100644 index 000000000..f29a37731 --- /dev/null +++ b/GreenshotQiniuPlugin/Forms/QiniuForm.cs @@ -0,0 +1,28 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ + +namespace GreenshotQiniuPlugin { + /// + /// This class is needed for design-time resolving of the language files + /// + public class QiniuForm : GreenshotPlugin.Controls.GreenshotForm { + } +} diff --git a/GreenshotQiniuPlugin/Forms/SettingsForm.Designer.cs b/GreenshotQiniuPlugin/Forms/SettingsForm.Designer.cs new file mode 100644 index 000000000..0249502d0 --- /dev/null +++ b/GreenshotQiniuPlugin/Forms/SettingsForm.Designer.cs @@ -0,0 +1,196 @@ +namespace GreenshotQiniuPlugin +{ + partial class SettingsForm + { + /// + /// 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm)); + this.gslblAccessKey = new GreenshotPlugin.Controls.GreenshotLabel(); + this.gstbAccessKey = new GreenshotPlugin.Controls.GreenshotTextBox(); + this.gstbSecretKey = new GreenshotPlugin.Controls.GreenshotTextBox(); + this.gslblSecretKey = new GreenshotPlugin.Controls.GreenshotLabel(); + this.gstbScope = new GreenshotPlugin.Controls.GreenshotTextBox(); + this.gslblScope = new GreenshotPlugin.Controls.GreenshotLabel(); + this.buttonCancel = new GreenshotPlugin.Controls.GreenshotButton(); + this.buttonOK = new GreenshotPlugin.Controls.GreenshotButton(); + this.checkbox_usepagelink = new GreenshotPlugin.Controls.GreenshotCheckBox(); + this.label_upload_format = new GreenshotPlugin.Controls.GreenshotLabel(); + this.combobox_uploadimageformat = new GreenshotPlugin.Controls.GreenshotComboBox(); + this.SuspendLayout(); + // + // gslblAccessKey + // + this.gslblAccessKey.AutoSize = true; + this.gslblAccessKey.Location = new System.Drawing.Point(18, 85); + this.gslblAccessKey.Name = "gslblAccessKey"; + this.gslblAccessKey.Size = new System.Drawing.Size(65, 12); + this.gslblAccessKey.TabIndex = 0; + this.gslblAccessKey.Text = "Access Key"; + // + // gstbAccessKey + // + this.gstbAccessKey.Location = new System.Drawing.Point(107, 85); + this.gstbAccessKey.Name = "gstbAccessKey"; + this.gstbAccessKey.PropertyName = "AccessKey"; + this.gstbAccessKey.SectionName = "Qiniu"; + this.gstbAccessKey.Size = new System.Drawing.Size(261, 21); + this.gstbAccessKey.TabIndex = 1; + // + // gstbSecretKey + // + this.gstbSecretKey.Location = new System.Drawing.Point(107, 116); + this.gstbSecretKey.Name = "gstbSecretKey"; + this.gstbSecretKey.PropertyName = "SecretKey"; + this.gstbSecretKey.SectionName = "Qiniu"; + this.gstbSecretKey.Size = new System.Drawing.Size(261, 21); + this.gstbSecretKey.TabIndex = 3; + // + // gslblSecretKey + // + this.gslblSecretKey.AutoSize = true; + this.gslblSecretKey.Location = new System.Drawing.Point(18, 119); + this.gslblSecretKey.Name = "gslblSecretKey"; + this.gslblSecretKey.Size = new System.Drawing.Size(65, 12); + this.gslblSecretKey.TabIndex = 2; + this.gslblSecretKey.Text = "Secret Key"; + // + // gstbScope + // + this.gstbScope.Location = new System.Drawing.Point(107, 148); + this.gstbScope.Name = "gstbScope"; + this.gstbScope.PropertyName = "Scope"; + this.gstbScope.SectionName = "Qiniu"; + this.gstbScope.Size = new System.Drawing.Size(261, 21); + this.gstbScope.TabIndex = 5; + // + // gslblScope + // + this.gslblScope.AutoSize = true; + this.gslblScope.Location = new System.Drawing.Point(18, 151); + this.gslblScope.Name = "gslblScope"; + this.gslblScope.Size = new System.Drawing.Size(35, 12); + this.gslblScope.TabIndex = 4; + this.gslblScope.Text = "Scope"; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.LanguageKey = "CANCEL"; + this.buttonCancel.Location = new System.Drawing.Point(294, 208); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.TabIndex = 7; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOK.LanguageKey = "OK"; + this.buttonOK.Location = new System.Drawing.Point(213, 208); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(75, 23); + this.buttonOK.TabIndex = 6; + this.buttonOK.Text = "Ok"; + this.buttonOK.UseVisualStyleBackColor = true; + // + // checkbox_usepagelink + // + this.checkbox_usepagelink.AutoSize = true; + this.checkbox_usepagelink.LanguageKey = "Qiniu.use_page_link"; + this.checkbox_usepagelink.Location = new System.Drawing.Point(20, 48); + this.checkbox_usepagelink.Name = "checkbox_usepagelink"; + this.checkbox_usepagelink.PropertyName = "UsePageLink"; + this.checkbox_usepagelink.SectionName = "Qiniu"; + this.checkbox_usepagelink.Size = new System.Drawing.Size(312, 16); + this.checkbox_usepagelink.TabIndex = 14; + this.checkbox_usepagelink.Text = "Use page link instead of image link on clipboard"; + this.checkbox_usepagelink.UseVisualStyleBackColor = true; + // + // label_upload_format + // + this.label_upload_format.LanguageKey = "Qiniu.label_upload_format"; + this.label_upload_format.Location = new System.Drawing.Point(18, 15); + this.label_upload_format.Name = "label_upload_format"; + this.label_upload_format.Size = new System.Drawing.Size(83, 20); + this.label_upload_format.TabIndex = 15; + this.label_upload_format.Text = "Image format"; + // + // combobox_uploadimageformat + // + this.combobox_uploadimageformat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.combobox_uploadimageformat.FormattingEnabled = true; + this.combobox_uploadimageformat.Location = new System.Drawing.Point(107, 12); + this.combobox_uploadimageformat.Name = "combobox_uploadimageformat"; + this.combobox_uploadimageformat.PropertyName = "UploadFormat"; + this.combobox_uploadimageformat.SectionName = "Qiniu"; + this.combobox_uploadimageformat.Size = new System.Drawing.Size(261, 20); + this.combobox_uploadimageformat.TabIndex = 13; + // + // SettingsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(396, 243); + this.Controls.Add(this.checkbox_usepagelink); + this.Controls.Add(this.label_upload_format); + this.Controls.Add(this.combobox_uploadimageformat); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.gstbScope); + this.Controls.Add(this.gslblScope); + this.Controls.Add(this.gstbSecretKey); + this.Controls.Add(this.gslblSecretKey); + this.Controls.Add(this.gstbAccessKey); + this.Controls.Add(this.gslblAccessKey); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SettingsForm"; + this.Text = "Qiniu image upload settings"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private GreenshotPlugin.Controls.GreenshotLabel gslblAccessKey; + private GreenshotPlugin.Controls.GreenshotTextBox gstbAccessKey; + private GreenshotPlugin.Controls.GreenshotTextBox gstbSecretKey; + private GreenshotPlugin.Controls.GreenshotLabel gslblSecretKey; + private GreenshotPlugin.Controls.GreenshotTextBox gstbScope; + private GreenshotPlugin.Controls.GreenshotLabel gslblScope; + private GreenshotPlugin.Controls.GreenshotButton buttonCancel; + private GreenshotPlugin.Controls.GreenshotButton buttonOK; + private GreenshotPlugin.Controls.GreenshotCheckBox checkbox_usepagelink; + private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; + private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; + } +} \ No newline at end of file diff --git a/GreenshotQiniuPlugin/Forms/SettingsForm.cs b/GreenshotQiniuPlugin/Forms/SettingsForm.cs new file mode 100644 index 000000000..de0b6600a --- /dev/null +++ b/GreenshotQiniuPlugin/Forms/SettingsForm.cs @@ -0,0 +1,33 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ + +namespace GreenshotQiniuPlugin +{ + public partial class SettingsForm : QiniuForm + { + public SettingsForm() + { + InitializeComponent(); + AcceptButton = buttonOK; + CancelButton = buttonCancel; + } + } +} diff --git a/GreenshotQiniuPlugin/Forms/SettingsForm.resx b/GreenshotQiniuPlugin/Forms/SettingsForm.resx new file mode 100644 index 000000000..ddcfe10b1 --- /dev/null +++ b/GreenshotQiniuPlugin/Forms/SettingsForm.resx @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAUAAAAAAAEACAClFwAAVgAAADAwAAABAAgAqA4AAPsXAAAgIAAAAQAIAKgIAACjJgAAGBgAAAEA + CADIBgAASy8AABAQAAABAAgAaAUAABM2AACJUE5HDQoaCgAAAA1JSERSAAABAAAAAQAIBgAAAFxyqGYA + ABdsSURBVHja7Z1fqFVVHsf3YQqnUTJQSJMcujkK3UHuFW5geBXGYK5B0EP6Gto8zIsG8zKY82rCvKXP + 6bv2FqQP9eAfEhS8Eilozo0xTAOFbGycKLjTd9u6nnvvXnuvvff6/dbea30/cEioPPucs9Z3/dbv72By + cnI2I4QkyYACQEi6UAAISRgKACEJQwEgJGEoAIQkDAWAkIShABCSMBQAQhKGAkBIwlAACEkYCgAhCUMB + ICRhKACEJAwFgJCEoQAQkjAUAEIShgJASMJQAAhJGAoAIQlDASAkYSgAhCQMBYCQhKEAEJIwFABCEoYC + QEjCUAAISRgKACEJQwEgJGEoAIQkDAWAkIShABCSMBQAQhKGAkBIwlAACEkYCgAhCUMBICRhKACEJAwF + gJCEoQAQkjAUAEIShgJASMJQAAhJmOgF4MllP2dP/+GH/M8rx77L7t9Ylv304Ins4e0l2X/v/Db04xES + lCgF4Her/pc9v+PbbNXkvezpdT9Y/7uHd5Zkt8+tzL4++Wz2/ZdLQz82IepEJQDY+Ov33Myen/q29v97 + 7/Ly7Nqx32f3ppeH/hiEqBGNAIzsvJVv/ieX/tzq75n5cE12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ACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8 + PDwAOkE+ADpEPwA5RUAAN01DADdORAA4SUEAOExDADVRRAA0VUYANFhHADNaSAA0WUgAMl1JAC9nTQAu + ak4ALWxPADFgSwAwY0wAMGRMAC1uUAAscVEAKnRSACp3VAApeVQAKH1WACeAVwAmg1gAJYVZACSIWgAk + i1wAIo1cACGSXgAhlF8AH5lhAB6cYgAdn2QAIJZgACCYYQAcomQAG6ZmABykZQAbqGcAGqpoABmtaQAX + smsAFrVsABixagAVuW4AFLxvABO/cAAUvnAADs52ABLAcQARx3MAEcd0ABDKdAAO0HcADdJ4AAzWeQAL + 2XoADNh6AAndfAAH5X8ACOJ+AAjkfwAH5oAABumBAATuggAD8oUABPCEAAL1hQAB+IcAAfqIAAD+iQBx + /50Akf+yALH/yQDR/98A////AAAAAAACLwAABFAAAAZwAAAIkAAACrAAAAvPAAAO8AAAIP8SAD3/MQBb + /1EAef9xAJj/kQC1/7EA1P/RAP///wAAAAAAFC8AACJQAAAwcAAAPZAAAEywAABZzwAAZ/AAAHj/EQCK + /zEAnP9RAK7/cQDA/5EA0v+xAOT/0QD///8AAAAAACYvAABAUAAAWnAAAHSQAACOsAAAqc8AAMLwAADR + /xEA2P8xAN7/UQDj/3EA6f+RAO//sQD2/9EA////AAAAAAAvJgAAUEEAAHBbAACQdAAAsI4AAM+pAADw + wwAA/9IRAP/YMQD/3VEA/+RxAP/qkQD/8LEA//bRAP///wAAAAAALxQAAFAiAABwMAAAkD4AALBNAADP + WwAA8GkAAP95EQD/ijEA/51RAP+vcQD/wZEA/9KxAP/l0QD///8AAAAAAC8DAABQBAAAcAYAAJAJAACw + CgAAzwwAAPAOAAD/IBIA/z4xAP9cUQD/enEA/5eRAP+2sQD/1NEA////AAAAAAAvAA4AUAAXAHAAIQCQ + ACsAsAA2AM8AQADwAEkA/xFaAP8xcAD/UYYA/3GcAP+RsgD/scgA/9HfAP///wAAAAAALwAgAFAANgBw + AEwAkABiALAAeAD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AtJSQiAAAAAB0rHQcFAAAAHBgFJhgAAAAV + AAAAAAAACwwwHiscAAAALxEAAAAAEDEcJRMAAAAAACoQAAAAAAUbCAAAAAAAAAAUKQcAAAAAAAAAAAAA + AAAAGi0IAAAAAAAAAAAAAAAAAAQWIgAAAAAAAAAAAAAAAAAoIi4CAAAAAAAAABkfAAAAIwAeFwAAAAcF + JiUhKwEAACcaLiYAEQwvJh8fAAEAAAApHgYdEjEkGRUAAAAAAAAAAAAJMR0UDAAAAAAAAAAAAAAAAA0C + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + + + \ No newline at end of file diff --git a/GreenshotQiniuPlugin/GreenshotQiniuPlugin.csproj b/GreenshotQiniuPlugin/GreenshotQiniuPlugin.csproj new file mode 100644 index 000000000..2c4b04e99 --- /dev/null +++ b/GreenshotQiniuPlugin/GreenshotQiniuPlugin.csproj @@ -0,0 +1,119 @@ + + + + + Debug + AnyCPU + {635759B5-9673-490F-B373-BAAB65C07B77} + Library + Properties + GreenshotQiniuPlugin + GreenshotQiniuPlugin + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\LinqBridge.1.3.0\lib\net20\LinqBridge.dll + + + ..\Greenshot\Lib\log4net.dll + + + False + ..\..\csharp-sdk\src\packages\Newtonsoft.Json.10.0.2\lib\net20\Newtonsoft.Json.dll + + + ..\..\csharp-sdk\bin\Qiniu.dll + + + + + + + + + + + + + + + + + + + + + Form + + + Form + + + SettingsForm.cs + + + + + + + {5B924697-4DCD-4F98-85F1-105CB84B7341} + GreenshotPlugin + + + + + SettingsForm.cs + + + QiniuPlugin.cs + Designer + + + + + + + + + + +if exist "$(ProjectDir)QiniuCredentials.private.cs" ( + rename "$(ProjectDir)QiniuCredentials.cs" "QiniuCredentials.orig.cs" + rename "$(ProjectDir)QiniuCredentials.private.cs" "QiniuCredentials.cs" +) + + + + +if exist "$(ProjectDir)QiniuCredentials.orig.cs" ( + rename "$(ProjectDir)QiniuCredentials.cs" "QiniuCredentials.private.cs" + rename "$(ProjectDir)QiniuCredentials.orig.cs" "QiniuCredentials.cs" +) +mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)" +copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\*.gsp" +copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\" +mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\Plugins\$(ProjectName)" +copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\Plugins\$(ProjectName)\" + + + \ No newline at end of file diff --git a/GreenshotQiniuPlugin/LanguageKeys.cs b/GreenshotQiniuPlugin/LanguageKeys.cs new file mode 100644 index 000000000..d8cc9d2b1 --- /dev/null +++ b/GreenshotQiniuPlugin/LanguageKeys.cs @@ -0,0 +1,41 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ + +namespace GreenshotQiniuPlugin { + public enum LangKey { + upload_menu_item, + settings_title, + label_url, + label_upload_format, + label_clear, + OK, + CANCEL, + upload_success, + upload_failure, + communication_wait, + delete_question, + clear_question, + delete_title, + use_page_link, + history, + configure + } +} diff --git a/GreenshotQiniuPlugin/Languages/language_qiniuplugin-en-US.xml b/GreenshotQiniuPlugin/Languages/language_qiniuplugin-en-US.xml new file mode 100644 index 000000000..28a0458a1 --- /dev/null +++ b/GreenshotQiniuPlugin/Languages/language_qiniuplugin-en-US.xml @@ -0,0 +1,53 @@ + + + + + Upload to Qiniu + + + Imgur settings + + + Url + + + OK + + + Cancel + + + Successfully uploaded image to Imgur! + + + An error occured while uploading to Imgur: + + + Image format + + + Communicating with Imgur. Please wait... + + + Are you sure you want to delete the image {0} from Imgur? + + + Are you sure you want to delete the local Imgur history? + + + Delete Imgur {0} + + + Use anonymous access + + + Use page link instead of image link on clipboard + + + History + + + Configure Qiniu + + + \ No newline at end of file diff --git a/GreenshotQiniuPlugin/Languages/language_qiniuplugin-zh-CN.xml b/GreenshotQiniuPlugin/Languages/language_qiniuplugin-zh-CN.xml new file mode 100644 index 000000000..ac382ba7e --- /dev/null +++ b/GreenshotQiniuPlugin/Languages/language_qiniuplugin-zh-CN.xml @@ -0,0 +1,21 @@ + + + + 使用匿名连接 + 取消 + 是否真的要删除本地的Imgur历史记录? + 正在连接到Imgur。请稍后... + 配置七牛云 + 是否真的要从Imgur上删除图片{0}? + 删除 Imgur {0} + 历史记录 + 图片格式 + 网址 + 确认 + Imgur设置 + 上传图片到Imgur时发生错误: + 上传图片到七牛云 + 图片已成功上传到了Imgur! + 当复制链接到剪贴板时,使用页面的网址而不是图片的网址 + + \ No newline at end of file diff --git a/GreenshotQiniuPlugin/Properties/AssemblyInfo.cs b/GreenshotQiniuPlugin/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..c27dd5ef3 --- /dev/null +++ b/GreenshotQiniuPlugin/Properties/AssemblyInfo.cs @@ -0,0 +1,60 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ + +using Greenshot.Plugin; +using System.Reflection; +using System.Runtime.InteropServices; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Greenshot-Qiniu-Plugin")] +[assembly: AssemblyDescription("A plugin to upload images to qiniu cloud.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Greenshot")] +[assembly: AssemblyProduct("Qiniu Plugin")] +[assembly: AssemblyCopyright("Copyright (C) 2007-2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + + +// The PluginAttribute describes the "entryType" and if the plugin is configurable +[assembly: PluginAttribute("GreenshotQiniuPlugin.QiniuPlugin", true)] +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("635759b5-9673-490f-b373-baab65c07b77")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyInformationalVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/GreenshotQiniuPlugin/QiniuConfiguration.cs b/GreenshotQiniuPlugin/QiniuConfiguration.cs new file mode 100644 index 000000000..b8a04cdae --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuConfiguration.cs @@ -0,0 +1,68 @@ +/* + * A Picasa Plugin for Greenshot + * Copyright (C) 2011 Francis Noel + * + * For more information see: http://getgreenshot.org/ + * + * 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 1 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, see . + */ +using System.Windows.Forms; +using Greenshot.IniFile; +using GreenshotPlugin.Core; +using System; + +namespace GreenshotQiniuPlugin +{ + /// + /// Description of QiniuConfiguration. + /// + [IniSection("Qiniu", Description = "Greenshot Qiniu Plugin configuration")] + class QiniuConfiguration : IniSection + { + [IniProperty("UploadFormat", Description = "What file type to use for uploading", DefaultValue = "png")] + public OutputFormat UploadFormat { get; set; } + [IniProperty("UploadJpegQuality", Description = "JPEG file save quality in %.", DefaultValue = "80")] + public int UploadJpegQuality { get; set; } + [IniProperty("UploadReduceColors", Description = "Reduce color amount of the uploaded image to 256", DefaultValue = "False")] + public bool UploadReduceColors { get; set; } + [IniProperty("UsePageLink", Description = "Use pagelink instead of direct link on the clipboard", DefaultValue = "False")] + public bool UsePageLink { get; set; } + + + [IniProperty("ImgQiniuUrl", Description = "Url to Qiniu cloud.", DefaultValue = "")] + public string ImgQiniuUrl { get; set; } + + [IniProperty("AccessKey", Description = "access key used for uploading", DefaultValue = "")] + public string AccessKey { get; set; } + + [IniProperty("SecretKey", Description = "secret key used for uploading", DefaultValue = "")] + public string SecretKey { get; set; } + + [IniProperty("Scope", Description = "scope key used for uploading", DefaultValue = "")] + public string Scope { get; set; } + + + /// + /// A form for username/password + /// + /// bool true if OK was pressed, false if cancel + public bool ShowConfigDialog() + { + SettingsForm settingsForm = new SettingsForm(); + DialogResult result = settingsForm.ShowDialog(); + return result == DialogResult.OK; + } + + } +} diff --git a/GreenshotQiniuPlugin/QiniuCredentials.cs b/GreenshotQiniuPlugin/QiniuCredentials.cs new file mode 100644 index 000000000..c84ba657f --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuCredentials.cs @@ -0,0 +1,31 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ + +namespace GreenshotQiniuPlugin { + /// + /// This class is merely a placeholder for the file keeping the API key and secret for imgur integration. + /// You can set your own values here + /// + public static class QiniuCredentials { + public static string CONSUMER_KEY = "@credentials_Qiniu_consumer_key@"; + public static string CONSUMER_SECRET = "@credentials_Qiniu_consumer_secret@"; + } +} diff --git a/GreenshotQiniuPlugin/QiniuDestination.cs b/GreenshotQiniuPlugin/QiniuDestination.cs new file mode 100644 index 000000000..72c0810ac --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuDestination.cs @@ -0,0 +1,62 @@ +/* + * A Picasa Plugin for Greenshot + * Copyright (C) 2011 Francis Noel + * + * For more information see: http://getgreenshot.org/ + * + * 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 1 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, see . + */ +using System.ComponentModel; +using System.Drawing; +using Greenshot.Plugin; +using GreenshotPlugin.Core; + +namespace GreenshotQiniuPlugin +{ + class QiniuDestination : AbstractDestination + { + private readonly QiniuPlugin _plugin; + public QiniuDestination(QiniuPlugin plugin) + { + _plugin = plugin; + } + + public override string Designation => "Qiniu"; + + public override string Description => Language.GetString("qiniu", LangKey.upload_menu_item); + + public override Image DisplayIcon + { + get + { + ComponentResourceManager resources = new ComponentResourceManager(typeof(QiniuPlugin)); + return (Image)resources.GetObject("Qiniu"); + } + } + + public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) + { + ExportInformation exportInformation = new ExportInformation(Designation, Description); + string uploadUrl; + bool uploaded = _plugin.Upload(captureDetails, surface, out uploadUrl); + if (uploaded) + { + exportInformation.ExportMade = true; + exportInformation.Uri = uploadUrl; + } + ProcessExport(exportInformation, surface); + return exportInformation; + } + } +} diff --git a/GreenshotQiniuPlugin/QiniuInfo.cs b/GreenshotQiniuPlugin/QiniuInfo.cs new file mode 100644 index 000000000..9d04eff1b --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuInfo.cs @@ -0,0 +1,215 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ +using System; +using System.Drawing; +using System.Xml; + +namespace GreenshotQiniuPlugin +{ + class QiniuInfo : IDisposable + { + private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(QiniuInfo)); + + public string Hash + { + get; + set; + } + + private string _deleteHash; + public string DeleteHash + { + get { return _deleteHash; } + set + { + _deleteHash = value; + DeletePage = "https://imgur.com/delete/" + value; + } + } + + public string Title + { + get; + set; + } + + public string ImageType + { + get; + set; + } + + public DateTime Timestamp + { + get; + set; + } + + public string Original + { + get; + set; + } + + public string Page + { + get; + set; + } + + public string SmallSquare + { + get; + set; + } + + public string LargeThumbnail + { + get; + set; + } + + public string DeletePage + { + get; + set; + } + + private Image _image; + public Image Image + { + get { return _image; } + set + { + _image?.Dispose(); + _image = value; + } + } + + /// + /// The public accessible Dispose + /// Will call the GarbageCollector to SuppressFinalize, preventing being cleaned twice + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// This Dispose is called from the Dispose and the Destructor. + /// When disposing==true all non-managed resources should be freed too! + /// + /// + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + _image?.Dispose(); + } + _image = null; + } + public static QiniuInfo ParseResponse(string response) + { + Log.Debug(response); + // This is actually a hack for BUG-1695 + // The problem is the (C) sign, we send it HTML encoded "®" to Imgur and get it HTML encoded in the XML back + // Added all the encodings I found quickly, I guess these are not all... but it should fix the issue for now. + response = response.Replace("¢", "¢"); + response = response.Replace("£", "£"); + response = response.Replace("¥", "¥"); + response = response.Replace("€", "€"); + response = response.Replace("©", "©"); + response = response.Replace("®", "®"); + + QiniuInfo qiniuInfo = new QiniuInfo(); + try + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(response); + XmlNodeList nodes = doc.GetElementsByTagName("id"); + if (nodes.Count > 0) + { + qiniuInfo.Hash = nodes.Item(0)?.InnerText; + } + nodes = doc.GetElementsByTagName("hash"); + if (nodes.Count > 0) + { + qiniuInfo.Hash = nodes.Item(0)?.InnerText; + } + nodes = doc.GetElementsByTagName("deletehash"); + if (nodes.Count > 0) + { + qiniuInfo.DeleteHash = nodes.Item(0)?.InnerText; + } + nodes = doc.GetElementsByTagName("type"); + if (nodes.Count > 0) + { + qiniuInfo.ImageType = nodes.Item(0)?.InnerText; + } + nodes = doc.GetElementsByTagName("title"); + if (nodes.Count > 0) + { + qiniuInfo.Title = nodes.Item(0)?.InnerText; + } + nodes = doc.GetElementsByTagName("datetime"); + if (nodes.Count > 0) + { + // Version 3 has seconds since Epoch + double secondsSince; + if (double.TryParse(nodes.Item(0)?.InnerText, out secondsSince)) + { + var epoch = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero); + qiniuInfo.Timestamp = epoch.AddSeconds(secondsSince).DateTime; + } + } + nodes = doc.GetElementsByTagName("original"); + if (nodes.Count > 0) + { + qiniuInfo.Original = nodes.Item(0)?.InnerText.Replace("http:", "https:"); + } + // Version 3 API only has Link + nodes = doc.GetElementsByTagName("link"); + if (nodes.Count > 0) + { + qiniuInfo.Original = nodes.Item(0)?.InnerText.Replace("http:", "https:"); + } + nodes = doc.GetElementsByTagName("imgur_page"); + if (nodes.Count > 0) + { + qiniuInfo.Page = nodes.Item(0)?.InnerText.Replace("http:", "https:"); + } + else + { + // Version 3 doesn't have a page link in the response + qiniuInfo.Page = $"https://imgur.com/{qiniuInfo.Hash}"; + } + nodes = doc.GetElementsByTagName("small_square"); + qiniuInfo.SmallSquare = nodes.Count > 0 ? nodes.Item(0)?.InnerText : $"http://i.imgur.com/{qiniuInfo.Hash}s.png"; + } + catch (Exception e) + { + Log.ErrorFormat("Could not parse Imgur response due to error {0}, response was: {1}", e.Message, response); + } + return qiniuInfo; + } + } +} diff --git a/GreenshotQiniuPlugin/QiniuPlugin.cs b/GreenshotQiniuPlugin/QiniuPlugin.cs new file mode 100644 index 000000000..3f36367a6 --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuPlugin.cs @@ -0,0 +1,190 @@ +/* + * A Picasa Plugin for Greenshot + * Copyright (C) 2011 Francis Noel + * + * For more information see: http://getgreenshot.org/ + * + * 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 1 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, see . + */ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.IO; +using System.Windows.Forms; +using Greenshot.IniFile; +using Greenshot.Plugin; +using GreenshotPlugin.Controls; +using GreenshotPlugin.Core; + +using Qiniu.Common; +using Qiniu.IO; +using Qiniu.IO.Model; +using Qiniu.Http; +using Qiniu.Util; + +namespace GreenshotQiniuPlugin +{ + public class QiniuPlugin : IGreenshotPlugin + { + private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(QiniuPlugin)); + private static QiniuConfiguration _config; + public static PluginAttribute Attributes; + private IGreenshotHost _host; + private ComponentResourceManager _resources; + private ToolStripMenuItem _itemPlugInConfig; + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (_itemPlugInConfig != null) + { + _itemPlugInConfig.Dispose(); + _itemPlugInConfig = null; + } + } + } + + public IEnumerable Destinations() + { + yield return new QiniuDestination(this); + } + + public IEnumerable Processors() + { + yield break; + } + + /// + /// Implementation of the IGreenshotPlugin.Initialize + /// + /// Use the IGreenshotPluginHost interface to register events + /// My own attributes + /// true if plugin is initialized, false if not (doesn't show) + public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) + { + _host = pluginHost; + Attributes = myAttributes; + + // Get configuration + _config = IniConfig.GetIniSection(); + _resources = new ComponentResourceManager(typeof(QiniuPlugin)); + string text = Language.GetString("Qiniu", LangKey.configure); + _itemPlugInConfig = new ToolStripMenuItem(text) + { + Tag = _host, + Image = (Image)_resources.GetObject("Qiniu") + }; + _itemPlugInConfig.Click += delegate { + _config.ShowConfigDialog(); + }; + + PluginUtils.AddToContextMenu(_host, _itemPlugInConfig); + Language.LanguageChanged += OnLanguageChanged; + return true; + } + + public void OnLanguageChanged(object sender, EventArgs e) + { + if (_itemPlugInConfig != null) + { + _itemPlugInConfig.Text = Language.GetString("Qiniu", LangKey.configure); + } + } + + public virtual void Shutdown() + { + Log.Debug("Qiniu Plugin shutdown."); + Language.LanguageChanged -= OnLanguageChanged; + } + + /// + /// Implementation of the IPlugin.Configure + /// + public virtual void Configure() + { + _config.ShowConfigDialog(); + } + + + /// + /// Upload the capture to qiniu cloud + /// + /// + /// ISurface + /// Path to the album + /// out string for the url + /// true if the upload succeeded + public bool Upload(ICaptureDetails captureDetails, ISurface surfaceToUpload, out string uploadUrl) + { + SurfaceOutputSettings outputSettings = new SurfaceOutputSettings(_config.UploadFormat, _config.UploadJpegQuality, _config.UploadReduceColors); + try + { + string filename = Path.GetFileName(FilenameHelper.GetFilename(_config.UploadFormat, captureDetails)); + QiniuInfo qiniuInfo = null; + + + string path = Directory.GetCurrentDirectory(); + + string fullPath = Path.Combine(path, filename); + + // public static void Save(ISurface surface, string fullPath, bool allowOverwrite, SurfaceOutputSettings outputSettings, bool copyPathToClipboard) + // Run upload in the background + ImageOutput.Save(surfaceToUpload,fullPath,true,outputSettings,true); + //new PleaseWaitForm().ShowAndWait(Attributes.Name, Language.GetString("Qiniu", LangKey.communication_wait), + // delegate + // { + HttpResult result = QiniuUtils.UploadFile(fullPath,filename); + + //} + //); + // This causes an exeption if the upload failed :) + Log.DebugFormat("Uploaded to qiniu page: " + qiniuInfo.Page); + uploadUrl = null; + try + { + if (_config.UsePageLink) + { + uploadUrl = qiniuInfo.Page; + Clipboard.SetText(qiniuInfo.Page); + } + else + { + uploadUrl = qiniuInfo.Original; + Clipboard.SetText(qiniuInfo.Original); + } + } + catch (Exception ex) + { + Log.Error("Can't write to clipboard: ", ex); + } + return true; + } + catch (Exception e) + { + Log.Error(e); + MessageBox.Show(Language.GetString("Qiniu", LangKey.upload_failure) + " " + e.Message); + } + uploadUrl = null; + return false; + } + } +} diff --git a/GreenshotQiniuPlugin/QiniuPlugin.resx b/GreenshotQiniuPlugin/QiniuPlugin.resx new file mode 100644 index 000000000..2affd0476 --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuPlugin.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\Qiniu.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/GreenshotQiniuPlugin/QiniuUtils.cs b/GreenshotQiniuPlugin/QiniuUtils.cs new file mode 100644 index 000000000..b055542f9 --- /dev/null +++ b/GreenshotQiniuPlugin/QiniuUtils.cs @@ -0,0 +1,100 @@ +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot + * + * 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 1 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, see . + */ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using Greenshot.IniFile; +using Greenshot.Plugin; +using GreenshotPlugin.Core; + +using Qiniu.Common; +using Qiniu.IO; +using Qiniu.IO.Model; +using Qiniu.Http; +using Qiniu.Util; + +namespace GreenshotQiniuPlugin +{ + /// + /// A collection of Qiniu helper methods + /// + public static class QiniuUtils { + private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(QiniuUtils)); + private static readonly QiniuConfiguration _config = IniConfig.GetIniSection(); + + + + public static HttpResult UploadFile(string fullPath,string fileName) + { + Mac mac = new Mac(_config.AccessKey, _config.SecretKey); + PutPolicy putPolicy = new PutPolicy(); + putPolicy.Scope = _config.Scope; + putPolicy.SetExpires(3600); + putPolicy.DeleteAfterDays = 1; + string token = Auth.CreateUploadToken(mac, putPolicy.ToJsonString()); + + ResumableUploader target = new ResumableUploader(); + HttpResult result = target.UploadFile(fullPath, fileName, token); + File.Delete(fullPath); + return result; + } + + /// + /// Helper for logging + /// + /// + /// + private static void LogHeader(IDictionary nameValues, string key) { + if (nameValues.ContainsKey(key)) { + Log.InfoFormat("{0}={1}", key, nameValues[key]); + } + } + + /// + /// Log the current rate-limit information + /// + /// + private static void LogRateLimitInfo(WebResponse response) { + IDictionary nameValues = new Dictionary(); + foreach (string key in response.Headers.AllKeys) { + if (!nameValues.ContainsKey(key)) { + nameValues.Add(key, response.Headers[key]); + } + } + LogHeader(nameValues, "X-RateLimit-Limit"); + LogHeader(nameValues, "X-RateLimit-Remaining"); + LogHeader(nameValues, "X-RateLimit-UserLimit"); + LogHeader(nameValues, "X-RateLimit-UserRemaining"); + LogHeader(nameValues, "X-RateLimit-UserReset"); + LogHeader(nameValues, "X-RateLimit-ClientLimit"); + LogHeader(nameValues, "X-RateLimit-ClientRemaining"); + + // Update the credits in the config, this is shown in a form + //int credits; + //if (nameValues.ContainsKey("X-RateLimit-Remaining") && int.TryParse(nameValues["X-RateLimit-Remaining"], out credits)) { + // Config.Credits = credits; + //} + } + } +} diff --git a/GreenshotQiniuPlugin/Resources/Qiniu.bmp b/GreenshotQiniuPlugin/Resources/Qiniu.bmp new file mode 100644 index 000000000..fe789130d Binary files /dev/null and b/GreenshotQiniuPlugin/Resources/Qiniu.bmp differ