mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Few Gfycat changes, About window updated
This commit is contained in:
parent
708ff2aa38
commit
46ff96e9d2
14 changed files with 157 additions and 120 deletions
181
ShareX/Forms/AboutForm.Designer.cs
generated
181
ShareX/Forms/AboutForm.Designer.cs
generated
|
@ -31,24 +31,24 @@ private void InitializeComponent()
|
|||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
|
||||
this.lblProductName = new System.Windows.Forms.Label();
|
||||
this.lblBerk = new System.Windows.Forms.Label();
|
||||
this.pbTR = new System.Windows.Forms.PictureBox();
|
||||
this.pbBerkURL = new System.Windows.Forms.PictureBox();
|
||||
this.pbMikeURL = new System.Windows.Forms.PictureBox();
|
||||
this.pbAU = new System.Windows.Forms.PictureBox();
|
||||
this.lblMike = new System.Windows.Forms.Label();
|
||||
this.pbBerkSteamURL = new System.Windows.Forms.PictureBox();
|
||||
this.rtbCredits = new System.Windows.Forms.RichTextBox();
|
||||
this.rtbShareXInfo = new System.Windows.Forms.RichTextBox();
|
||||
this.lblOwners = new System.Windows.Forms.Label();
|
||||
this.pbMikeSteamURL = new System.Windows.Forms.PictureBox();
|
||||
this.cLogo = new HelpersLib.Canvas();
|
||||
this.uclUpdate = new HelpersLib.UpdateCheckerLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbTR)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).BeginInit();
|
||||
this.pbMikeSteamURL = new System.Windows.Forms.PictureBox();
|
||||
this.pbBerkSteamURL = new System.Windows.Forms.PictureBox();
|
||||
this.pbMikeURL = new System.Windows.Forms.PictureBox();
|
||||
this.pbAU = new System.Windows.Forms.PictureBox();
|
||||
this.pbBerkURL = new System.Windows.Forms.PictureBox();
|
||||
this.pbTR = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbAU)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbTR)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblProductName
|
||||
|
@ -77,54 +77,6 @@ private void InitializeComponent()
|
|||
this.lblBerk.TabIndex = 4;
|
||||
this.lblBerk.Text = "Jaex (Berk)";
|
||||
//
|
||||
// pbTR
|
||||
//
|
||||
this.pbTR.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbTR.Image = global::ShareX.Properties.Resources.tr;
|
||||
this.pbTR.Location = new System.Drawing.Point(17, 142);
|
||||
this.pbTR.Name = "pbTR";
|
||||
this.pbTR.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbTR.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbTR.TabIndex = 8;
|
||||
this.pbTR.TabStop = false;
|
||||
//
|
||||
// pbBerkURL
|
||||
//
|
||||
this.pbBerkURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbBerkURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbBerkURL.Image = global::ShareX.Properties.Resources.application_browser;
|
||||
this.pbBerkURL.Location = new System.Drawing.Point(41, 142);
|
||||
this.pbBerkURL.Name = "pbBerkURL";
|
||||
this.pbBerkURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbBerkURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbBerkURL.TabIndex = 10;
|
||||
this.pbBerkURL.TabStop = false;
|
||||
this.pbBerkURL.Click += new System.EventHandler(this.pbBerkURL_Click);
|
||||
//
|
||||
// pbMikeURL
|
||||
//
|
||||
this.pbMikeURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbMikeURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbMikeURL.Image = global::ShareX.Properties.Resources.application_browser;
|
||||
this.pbMikeURL.Location = new System.Drawing.Point(41, 166);
|
||||
this.pbMikeURL.Name = "pbMikeURL";
|
||||
this.pbMikeURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbMikeURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbMikeURL.TabIndex = 14;
|
||||
this.pbMikeURL.TabStop = false;
|
||||
this.pbMikeURL.Click += new System.EventHandler(this.pbMikeURL_Click);
|
||||
//
|
||||
// pbAU
|
||||
//
|
||||
this.pbAU.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbAU.Image = global::ShareX.Properties.Resources.au;
|
||||
this.pbAU.Location = new System.Drawing.Point(17, 166);
|
||||
this.pbAU.Name = "pbAU";
|
||||
this.pbAU.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbAU.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbAU.TabIndex = 12;
|
||||
this.pbAU.TabStop = false;
|
||||
//
|
||||
// lblMike
|
||||
//
|
||||
this.lblMike.AutoSize = true;
|
||||
|
@ -136,19 +88,6 @@ private void InitializeComponent()
|
|||
this.lblMike.TabIndex = 6;
|
||||
this.lblMike.Text = "mcored (Michael Delpach)";
|
||||
//
|
||||
// pbBerkSteamURL
|
||||
//
|
||||
this.pbBerkSteamURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbBerkSteamURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbBerkSteamURL.Image = global::ShareX.Properties.Resources.steam;
|
||||
this.pbBerkSteamURL.Location = new System.Drawing.Point(65, 142);
|
||||
this.pbBerkSteamURL.Name = "pbBerkSteamURL";
|
||||
this.pbBerkSteamURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbBerkSteamURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbBerkSteamURL.TabIndex = 21;
|
||||
this.pbBerkSteamURL.TabStop = false;
|
||||
this.pbBerkSteamURL.Click += new System.EventHandler(this.pbBerkSteamURL_Click);
|
||||
//
|
||||
// rtbCredits
|
||||
//
|
||||
this.rtbCredits.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
|
@ -159,9 +98,10 @@ private void InitializeComponent()
|
|||
this.rtbCredits.Location = new System.Drawing.Point(15, 200);
|
||||
this.rtbCredits.Name = "rtbCredits";
|
||||
this.rtbCredits.ReadOnly = true;
|
||||
this.rtbCredits.Size = new System.Drawing.Size(417, 248);
|
||||
this.rtbCredits.Size = new System.Drawing.Size(411, 240);
|
||||
this.rtbCredits.TabIndex = 11;
|
||||
this.rtbCredits.Text = resources.GetString("rtbCredits.Text");
|
||||
this.rtbCredits.WordWrap = false;
|
||||
this.rtbCredits.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtb_LinkClicked);
|
||||
//
|
||||
// rtbShareXInfo
|
||||
|
@ -186,19 +126,6 @@ private void InitializeComponent()
|
|||
this.lblOwners.TabIndex = 3;
|
||||
this.lblOwners.Text = "Owners:";
|
||||
//
|
||||
// pbMikeSteamURL
|
||||
//
|
||||
this.pbMikeSteamURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbMikeSteamURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbMikeSteamURL.Image = global::ShareX.Properties.Resources.steam;
|
||||
this.pbMikeSteamURL.Location = new System.Drawing.Point(65, 166);
|
||||
this.pbMikeSteamURL.Name = "pbMikeSteamURL";
|
||||
this.pbMikeSteamURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbMikeSteamURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbMikeSteamURL.TabIndex = 34;
|
||||
this.pbMikeSteamURL.TabStop = false;
|
||||
this.pbMikeSteamURL.Click += new System.EventHandler(this.pbMikeSteamURL_Click);
|
||||
//
|
||||
// cLogo
|
||||
//
|
||||
this.cLogo.Interval = 100;
|
||||
|
@ -216,12 +143,86 @@ private void InitializeComponent()
|
|||
this.uclUpdate.Size = new System.Drawing.Size(224, 24);
|
||||
this.uclUpdate.TabIndex = 1;
|
||||
//
|
||||
// pbMikeSteamURL
|
||||
//
|
||||
this.pbMikeSteamURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbMikeSteamURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbMikeSteamURL.Image = global::ShareX.Properties.Resources.steam;
|
||||
this.pbMikeSteamURL.Location = new System.Drawing.Point(65, 166);
|
||||
this.pbMikeSteamURL.Name = "pbMikeSteamURL";
|
||||
this.pbMikeSteamURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbMikeSteamURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbMikeSteamURL.TabIndex = 34;
|
||||
this.pbMikeSteamURL.TabStop = false;
|
||||
this.pbMikeSteamURL.Click += new System.EventHandler(this.pbMikeSteamURL_Click);
|
||||
//
|
||||
// pbBerkSteamURL
|
||||
//
|
||||
this.pbBerkSteamURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbBerkSteamURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbBerkSteamURL.Image = global::ShareX.Properties.Resources.steam;
|
||||
this.pbBerkSteamURL.Location = new System.Drawing.Point(65, 142);
|
||||
this.pbBerkSteamURL.Name = "pbBerkSteamURL";
|
||||
this.pbBerkSteamURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbBerkSteamURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbBerkSteamURL.TabIndex = 21;
|
||||
this.pbBerkSteamURL.TabStop = false;
|
||||
this.pbBerkSteamURL.Click += new System.EventHandler(this.pbBerkSteamURL_Click);
|
||||
//
|
||||
// pbMikeURL
|
||||
//
|
||||
this.pbMikeURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbMikeURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbMikeURL.Image = global::ShareX.Properties.Resources.GitHub;
|
||||
this.pbMikeURL.Location = new System.Drawing.Point(41, 166);
|
||||
this.pbMikeURL.Name = "pbMikeURL";
|
||||
this.pbMikeURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbMikeURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbMikeURL.TabIndex = 14;
|
||||
this.pbMikeURL.TabStop = false;
|
||||
this.pbMikeURL.Click += new System.EventHandler(this.pbMikeURL_Click);
|
||||
//
|
||||
// pbAU
|
||||
//
|
||||
this.pbAU.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbAU.Image = global::ShareX.Properties.Resources.au;
|
||||
this.pbAU.Location = new System.Drawing.Point(17, 166);
|
||||
this.pbAU.Name = "pbAU";
|
||||
this.pbAU.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbAU.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbAU.TabIndex = 12;
|
||||
this.pbAU.TabStop = false;
|
||||
//
|
||||
// pbBerkURL
|
||||
//
|
||||
this.pbBerkURL.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbBerkURL.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.pbBerkURL.Image = global::ShareX.Properties.Resources.GitHub;
|
||||
this.pbBerkURL.Location = new System.Drawing.Point(41, 142);
|
||||
this.pbBerkURL.Name = "pbBerkURL";
|
||||
this.pbBerkURL.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbBerkURL.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbBerkURL.TabIndex = 10;
|
||||
this.pbBerkURL.TabStop = false;
|
||||
this.pbBerkURL.Click += new System.EventHandler(this.pbBerkURL_Click);
|
||||
//
|
||||
// pbTR
|
||||
//
|
||||
this.pbTR.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pbTR.Image = global::ShareX.Properties.Resources.tr;
|
||||
this.pbTR.Location = new System.Drawing.Point(17, 142);
|
||||
this.pbTR.Name = "pbTR";
|
||||
this.pbTR.Size = new System.Drawing.Size(16, 16);
|
||||
this.pbTR.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbTR.TabIndex = 8;
|
||||
this.pbTR.TabStop = false;
|
||||
//
|
||||
// AboutForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.ClientSize = new System.Drawing.Size(441, 457);
|
||||
this.ClientSize = new System.Drawing.Size(435, 449);
|
||||
this.Controls.Add(this.pbMikeSteamURL);
|
||||
this.Controls.Add(this.lblOwners);
|
||||
this.Controls.Add(this.rtbShareXInfo);
|
||||
|
@ -241,12 +242,12 @@ private void InitializeComponent()
|
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "ShareX - About";
|
||||
this.Shown += new System.EventHandler(this.AboutForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbTR)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbAU)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbTR)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ public AboutForm()
|
|||
Text = Program.Title;
|
||||
lblProductName.Text = Program.Title;
|
||||
|
||||
uclUpdate.CheckUpdate(TaskHelpers.CheckUpdate);
|
||||
|
||||
rtbShareXInfo.AddContextMenu();
|
||||
rtbCredits.AddContextMenu();
|
||||
|
||||
uclUpdate.CheckUpdate(TaskHelpers.CheckUpdate);
|
||||
}
|
||||
|
||||
private void AboutForm_Shown(object sender, EventArgs e)
|
||||
|
|
|
@ -120,10 +120,12 @@
|
|||
<data name="rtbCredits.Text" xml:space="preserve">
|
||||
<value>Contributors:
|
||||
|
||||
Logo and icon: Mopsy - http://mpql.net
|
||||
Jira, Gist and Mega support: gpailler (Grégoire Pailler)
|
||||
Web site: dmxt (Dana)
|
||||
Amazon S3 and DreamObjects support: Alan Edwardes - http://alanedwardes.com
|
||||
Logo and icon: https://github.com/mopquill - http://mpql.net
|
||||
Jira, Gist and Mega support: https://github.com/gpailler
|
||||
Web site: https://github.com/dmxt
|
||||
MediaCrush support: https://github.com/SirCmpwn - http://drewdevault.com
|
||||
Amazon S3 and DreamObjects support: https://github.com/alanedwardes - http://alanedwardes.com
|
||||
Gfycat support: https://github.com/Dinnerbone - http://dinnerbone.com
|
||||
|
||||
External libraries:
|
||||
|
||||
|
|
10
ShareX/Properties/Resources.Designer.cs
generated
10
ShareX/Properties/Resources.Designer.cs
generated
|
@ -459,6 +459,16 @@ public static System.Drawing.Bitmap gear {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap GitHub {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GitHub", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -112,12 +112,12 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -364,4 +364,7 @@
|
|||
<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="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>
|
||||
</root>
|
BIN
ShareX/Resources/GitHub.png
Normal file
BIN
ShareX/Resources/GitHub.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 434 B |
|
@ -494,6 +494,7 @@
|
|||
</None>
|
||||
<None Include="Resources\application-wave.png" />
|
||||
<None Include="Resources\barcode-2d.png" />
|
||||
<None Include="Resources\GitHub.png" />
|
||||
<Content Include="ShareX_Icon.ico" />
|
||||
<None Include="Resources\ru.png" />
|
||||
<None Include="Resources\keyboard--pencil.png" />
|
||||
|
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
@ -23,30 +23,42 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
// Credits: https://github.com/Dinnerbone
|
||||
|
||||
using HelpersLib;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using UploadersLib.HelperClasses;
|
||||
|
||||
namespace UploadersLib.FileUploaders
|
||||
{
|
||||
public class GfycatUploader : FileUploader
|
||||
{
|
||||
public bool NoResize { get; set; }
|
||||
public bool IgnoreExisting { get; set; }
|
||||
|
||||
public GfycatUploader()
|
||||
{
|
||||
NoResize = true;
|
||||
IgnoreExisting = false;
|
||||
}
|
||||
|
||||
public override UploadResult Upload(Stream stream, string fileName)
|
||||
{
|
||||
Dictionary<string, string> args = new Dictionary<string, string>();
|
||||
|
||||
// Magical official values from http://www.reddit.com/r/gfycat/comments/20xbth/any_word_on_allowing_uploading_a_gif_through_the/
|
||||
Dictionary<string, string> args = new Dictionary<string, string>();
|
||||
args.Add("key", Helpers.GetRandomAlphanumeric(10));
|
||||
args.Add("acl", "private");
|
||||
args.Add("AWSAccessKeyId", "AKIAIT4VU4B7G2LQYKZQ");
|
||||
args.Add("policy", "eyAiZXhwaXJhdGlvbiI6ICIyMDIwLTEyLTAxVDEyOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICAgICAgeyJidWNrZXQiOiAiZ2lmYWZmZSJ9LAogICAgICAgICAgICBbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAiIl0sCiAgICAgICAgICAgIHsiYWNsIjogInByaXZhdGUifSwKCSAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDAifSwKICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIkQ29udGVudC1UeXBlIiwgIiJdLAogICAgICAgICAgICBbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMCwgNTI0Mjg4MDAwXQogICAgICAgICAgICBdCiAgICAgICAgICB9");
|
||||
args.Add("success_action_status", "200");
|
||||
args.Add("signature", "mk9t/U/wRN4/uU01mXfeTe2Kcoc=");
|
||||
args.Add("Content-Type", MimeTypes.GetMimeType(Path.GetExtension(fileName).ToLower()));
|
||||
args.Add("Content-Type", Helpers.GetMimeType(fileName));
|
||||
|
||||
UploadResult result = UploadData(stream, "https://gifaffe.s3.amazonaws.com/", fileName, "file", args);
|
||||
|
||||
if (!result.IsError)
|
||||
|
@ -59,12 +71,18 @@ public override UploadResult Upload(Stream stream, string fileName)
|
|||
|
||||
private void TranscodeFile(string key, UploadResult result)
|
||||
{
|
||||
string transcodeJson = SendRequest(HttpMethod.GET, "https://upload.gfycat.com/transcodeRelease/" + key + "?noResize=true");
|
||||
Dictionary<string, string> args = new Dictionary<string, string>();
|
||||
if (NoResize) args.Add("noResize", "true");
|
||||
if (IgnoreExisting) args.Add("noMd5", "true");
|
||||
|
||||
string url = CreateQuery("https://upload.gfycat.com/transcodeRelease/" + key, args);
|
||||
string transcodeJson = SendRequest(HttpMethod.GET, url);
|
||||
GfycatTranscodeResponse transcodeResponse = JsonConvert.DeserializeObject<GfycatTranscodeResponse>(transcodeJson);
|
||||
|
||||
if (transcodeResponse.IsOk)
|
||||
{
|
||||
ProgressManager progress = new ProgressManager(10000);
|
||||
|
||||
if (AllowReportProgress)
|
||||
{
|
||||
OnProgressChanged(progress);
|
||||
|
@ -79,18 +97,20 @@ private void TranscodeFile(string key, UploadResult result)
|
|||
result.Errors.Add(response.Error);
|
||||
result.IsSuccess = false;
|
||||
break;
|
||||
} else if (response.GfyName != null) {
|
||||
}
|
||||
else if (response.GfyName != null)
|
||||
{
|
||||
result.IsSuccess = true;
|
||||
result.URL = "https://gfycat.com/" + response.GfyName;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (AllowReportProgress && progress.UpdateProgress((progress.Length - progress.Position) / response.Time))
|
||||
{
|
||||
OnProgressChanged(progress);
|
||||
}
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -83,7 +83,7 @@ public override UploadResult Upload(Stream stream, string fileName)
|
|||
{
|
||||
case "processing":
|
||||
case "pending":
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(500);
|
||||
break;
|
||||
case "done":
|
||||
case "ready":
|
||||
|
|
|
@ -102,7 +102,7 @@ private void FormSettings()
|
|||
ImageList textUploadersImageList = new ImageList();
|
||||
textUploadersImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
textUploadersImageList.Images.Add("Pastebin", Resources.Pastebin);
|
||||
textUploadersImageList.Images.Add("Gist", Resources.Gist);
|
||||
textUploadersImageList.Images.Add("Gist", Resources.GitHub);
|
||||
textUploadersImageList.Images.Add("Upaste", Resources.Upaste);
|
||||
tcTextUploaders.ImageList = textUploadersImageList;
|
||||
|
||||
|
|
4
UploadersLib/Properties/Resources.Designer.cs
generated
4
UploadersLib/Properties/Resources.Designer.cs
generated
|
@ -193,9 +193,9 @@ internal static System.Drawing.Icon Gett {
|
|||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon Gist {
|
||||
internal static System.Drawing.Icon GitHub {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Gist", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("GitHub", resourceCulture);
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,12 +112,12 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Dropbox" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Favicons\Dropbox.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -295,9 +295,6 @@
|
|||
<data name="Mega" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Favicons\Mega.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Gist" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Favicons\Gist.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Yourls" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\favicons\yourls.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -310,4 +307,7 @@
|
|||
<data name="AmazonS3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\favicons\AmazonS3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="GitHub" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Favicons\GitHub.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -358,7 +358,6 @@
|
|||
<None Include="Favicons\Dropbox.ico" />
|
||||
<None Include="Favicons\Flickr.ico" />
|
||||
<None Include="Favicons\Gett.ico" />
|
||||
<None Include="Favicons\Gist.ico" />
|
||||
<None Include="Favicons\Google.ico" />
|
||||
<None Include="Favicons\GoogleDrive.ico" />
|
||||
<None Include="Favicons\ImageShack.ico" />
|
||||
|
@ -424,6 +423,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Favicons\AmazonS3.ico" />
|
||||
<None Include="Favicons\GitHub.ico" />
|
||||
<Content Include="Favicons\Pushbullet.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
Loading…
Reference in a new issue