Few Gfycat changes, About window updated

This commit is contained in:
Jaex 2014-06-01 11:59:37 +03:00
parent 708ff2aa38
commit 46ff96e9d2
14 changed files with 157 additions and 120 deletions

View file

@ -31,24 +31,24 @@ private void InitializeComponent()
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
this.lblProductName = new System.Windows.Forms.Label(); this.lblProductName = new System.Windows.Forms.Label();
this.lblBerk = 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.lblMike = new System.Windows.Forms.Label();
this.pbBerkSteamURL = new System.Windows.Forms.PictureBox();
this.rtbCredits = new System.Windows.Forms.RichTextBox(); this.rtbCredits = new System.Windows.Forms.RichTextBox();
this.rtbShareXInfo = new System.Windows.Forms.RichTextBox(); this.rtbShareXInfo = new System.Windows.Forms.RichTextBox();
this.lblOwners = new System.Windows.Forms.Label(); this.lblOwners = new System.Windows.Forms.Label();
this.pbMikeSteamURL = new System.Windows.Forms.PictureBox();
this.cLogo = new HelpersLib.Canvas(); this.cLogo = new HelpersLib.Canvas();
this.uclUpdate = new HelpersLib.UpdateCheckerLabel(); this.uclUpdate = new HelpersLib.UpdateCheckerLabel();
((System.ComponentModel.ISupportInitialize)(this.pbTR)).BeginInit(); this.pbMikeSteamURL = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).BeginInit(); 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.pbMikeURL)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbAU)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbAU)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbTR)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// lblProductName // lblProductName
@ -77,54 +77,6 @@ private void InitializeComponent()
this.lblBerk.TabIndex = 4; this.lblBerk.TabIndex = 4;
this.lblBerk.Text = "Jaex (Berk)"; 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 // lblMike
// //
this.lblMike.AutoSize = true; this.lblMike.AutoSize = true;
@ -136,19 +88,6 @@ private void InitializeComponent()
this.lblMike.TabIndex = 6; this.lblMike.TabIndex = 6;
this.lblMike.Text = "mcored (Michael Delpach)"; 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 // rtbCredits
// //
this.rtbCredits.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 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.Location = new System.Drawing.Point(15, 200);
this.rtbCredits.Name = "rtbCredits"; this.rtbCredits.Name = "rtbCredits";
this.rtbCredits.ReadOnly = true; 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.TabIndex = 11;
this.rtbCredits.Text = resources.GetString("rtbCredits.Text"); this.rtbCredits.Text = resources.GetString("rtbCredits.Text");
this.rtbCredits.WordWrap = false;
this.rtbCredits.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtb_LinkClicked); this.rtbCredits.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtb_LinkClicked);
// //
// rtbShareXInfo // rtbShareXInfo
@ -186,19 +126,6 @@ private void InitializeComponent()
this.lblOwners.TabIndex = 3; this.lblOwners.TabIndex = 3;
this.lblOwners.Text = "Owners:"; 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 // cLogo
// //
this.cLogo.Interval = 100; this.cLogo.Interval = 100;
@ -216,12 +143,86 @@ private void InitializeComponent()
this.uclUpdate.Size = new System.Drawing.Size(224, 24); this.uclUpdate.Size = new System.Drawing.Size(224, 24);
this.uclUpdate.TabIndex = 1; 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 // AboutForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.WhiteSmoke; 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.pbMikeSteamURL);
this.Controls.Add(this.lblOwners); this.Controls.Add(this.lblOwners);
this.Controls.Add(this.rtbShareXInfo); this.Controls.Add(this.rtbShareXInfo);
@ -241,12 +242,12 @@ private void InitializeComponent()
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ShareX - About"; this.Text = "ShareX - About";
this.Shown += new System.EventHandler(this.AboutForm_Shown); this.Shown += new System.EventHandler(this.AboutForm_Shown);
((System.ComponentModel.ISupportInitialize)(this.pbTR)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbAU)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbAU)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbBerkSteamURL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBerkURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbMikeSteamURL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbTR)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

View file

@ -40,10 +40,10 @@ public AboutForm()
Text = Program.Title; Text = Program.Title;
lblProductName.Text = Program.Title; lblProductName.Text = Program.Title;
uclUpdate.CheckUpdate(TaskHelpers.CheckUpdate);
rtbShareXInfo.AddContextMenu(); rtbShareXInfo.AddContextMenu();
rtbCredits.AddContextMenu(); rtbCredits.AddContextMenu();
uclUpdate.CheckUpdate(TaskHelpers.CheckUpdate);
} }
private void AboutForm_Shown(object sender, EventArgs e) private void AboutForm_Shown(object sender, EventArgs e)

View file

@ -120,10 +120,12 @@
<data name="rtbCredits.Text" xml:space="preserve"> <data name="rtbCredits.Text" xml:space="preserve">
<value>Contributors: <value>Contributors:
Logo and icon: Mopsy - http://mpql.net Logo and icon: https://github.com/mopquill - http://mpql.net
Jira, Gist and Mega support: gpailler (Grégoire Pailler) Jira, Gist and Mega support: https://github.com/gpailler
Web site: dmxt (Dana) Web site: https://github.com/dmxt
Amazon S3 and DreamObjects support: Alan Edwardes - http://alanedwardes.com 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: External libraries:

View file

@ -459,6 +459,16 @@ public class Resources {
} }
} }
/// <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> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View file

@ -112,12 +112,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <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>
<resheader name="writer"> <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> </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"> <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> <value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -364,4 +364,7 @@
<data name="barcode_2d" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\barcode-2d.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </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> </root>

BIN
ShareX/Resources/GitHub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

View file

@ -494,6 +494,7 @@
</None> </None>
<None Include="Resources\application-wave.png" /> <None Include="Resources\application-wave.png" />
<None Include="Resources\barcode-2d.png" /> <None Include="Resources\barcode-2d.png" />
<None Include="Resources\GitHub.png" />
<Content Include="ShareX_Icon.ico" /> <Content Include="ShareX_Icon.ico" />
<None Include="Resources\ru.png" /> <None Include="Resources\ru.png" />
<None Include="Resources\keyboard--pencil.png" /> <None Include="Resources\keyboard--pencil.png" />

View file

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -23,30 +23,42 @@
#endregion License Information (GPL v3) #endregion License Information (GPL v3)
// Credits: https://github.com/Dinnerbone
using HelpersLib; using HelpersLib;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
using System.IO; using System.IO;
using System.Threading;
using UploadersLib.HelperClasses; using UploadersLib.HelperClasses;
namespace UploadersLib.FileUploaders namespace UploadersLib.FileUploaders
{ {
public class GfycatUploader : FileUploader 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) 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/ // 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("key", Helpers.GetRandomAlphanumeric(10));
args.Add("acl", "private"); args.Add("acl", "private");
args.Add("AWSAccessKeyId", "AKIAIT4VU4B7G2LQYKZQ"); args.Add("AWSAccessKeyId", "AKIAIT4VU4B7G2LQYKZQ");
args.Add("policy", "eyAiZXhwaXJhdGlvbiI6ICIyMDIwLTEyLTAxVDEyOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICAgICAgeyJidWNrZXQiOiAiZ2lmYWZmZSJ9LAogICAgICAgICAgICBbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAiIl0sCiAgICAgICAgICAgIHsiYWNsIjogInByaXZhdGUifSwKCSAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDAifSwKICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIkQ29udGVudC1UeXBlIiwgIiJdLAogICAgICAgICAgICBbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMCwgNTI0Mjg4MDAwXQogICAgICAgICAgICBdCiAgICAgICAgICB9"); args.Add("policy", "eyAiZXhwaXJhdGlvbiI6ICIyMDIwLTEyLTAxVDEyOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAiY29uZGl0aW9ucyI6IFsKICAgICAgICAgICAgeyJidWNrZXQiOiAiZ2lmYWZmZSJ9LAogICAgICAgICAgICBbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAiIl0sCiAgICAgICAgICAgIHsiYWNsIjogInByaXZhdGUifSwKCSAgICB7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6ICIyMDAifSwKICAgICAgICAgICAgWyJzdGFydHMtd2l0aCIsICIkQ29udGVudC1UeXBlIiwgIiJdLAogICAgICAgICAgICBbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMCwgNTI0Mjg4MDAwXQogICAgICAgICAgICBdCiAgICAgICAgICB9");
args.Add("success_action_status", "200"); args.Add("success_action_status", "200");
args.Add("signature", "mk9t/U/wRN4/uU01mXfeTe2Kcoc="); 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); UploadResult result = UploadData(stream, "https://gifaffe.s3.amazonaws.com/", fileName, "file", args);
if (!result.IsError) if (!result.IsError)
@ -59,12 +71,18 @@ public override UploadResult Upload(Stream stream, string fileName)
private void TranscodeFile(string key, UploadResult result) 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); GfycatTranscodeResponse transcodeResponse = JsonConvert.DeserializeObject<GfycatTranscodeResponse>(transcodeJson);
if (transcodeResponse.IsOk) if (transcodeResponse.IsOk)
{ {
ProgressManager progress = new ProgressManager(10000); ProgressManager progress = new ProgressManager(10000);
if (AllowReportProgress) if (AllowReportProgress)
{ {
OnProgressChanged(progress); OnProgressChanged(progress);
@ -79,18 +97,20 @@ private void TranscodeFile(string key, UploadResult result)
result.Errors.Add(response.Error); result.Errors.Add(response.Error);
result.IsSuccess = false; result.IsSuccess = false;
break; break;
} else if (response.GfyName != null) { }
else if (response.GfyName != null)
{
result.IsSuccess = true; result.IsSuccess = true;
result.URL = "https://gfycat.com/" + response.GfyName; result.URL = "https://gfycat.com/" + response.GfyName;
break; break;
} }
else
if (AllowReportProgress && progress.UpdateProgress((progress.Length - progress.Position) / response.Time))
{ {
if (AllowReportProgress && progress.UpdateProgress((progress.Length - progress.Position) / response.Time)) OnProgressChanged(progress);
{
OnProgressChanged(progress);
}
} }
Thread.Sleep(100);
} }
} }
else else

View file

@ -83,7 +83,7 @@ public override UploadResult Upload(Stream stream, string fileName)
{ {
case "processing": case "processing":
case "pending": case "pending":
Thread.Sleep(1000); Thread.Sleep(500);
break; break;
case "done": case "done":
case "ready": case "ready":

View file

@ -102,7 +102,7 @@ private void FormSettings()
ImageList textUploadersImageList = new ImageList(); ImageList textUploadersImageList = new ImageList();
textUploadersImageList.ColorDepth = ColorDepth.Depth32Bit; textUploadersImageList.ColorDepth = ColorDepth.Depth32Bit;
textUploadersImageList.Images.Add("Pastebin", Resources.Pastebin); textUploadersImageList.Images.Add("Pastebin", Resources.Pastebin);
textUploadersImageList.Images.Add("Gist", Resources.Gist); textUploadersImageList.Images.Add("Gist", Resources.GitHub);
textUploadersImageList.Images.Add("Upaste", Resources.Upaste); textUploadersImageList.Images.Add("Upaste", Resources.Upaste);
tcTextUploaders.ImageList = textUploadersImageList; tcTextUploaders.ImageList = textUploadersImageList;

View file

@ -193,9 +193,9 @@ internal class Resources {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary> /// </summary>
internal static System.Drawing.Icon Gist { internal static System.Drawing.Icon GitHub {
get { get {
object obj = ResourceManager.GetObject("Gist", resourceCulture); object obj = ResourceManager.GetObject("GitHub", resourceCulture);
return ((System.Drawing.Icon)(obj)); return ((System.Drawing.Icon)(obj));
} }
} }

View file

@ -112,12 +112,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <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>
<resheader name="writer"> <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> </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"> <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> <value>..\Favicons\Dropbox.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -295,9 +295,6 @@
<data name="Mega" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Favicons\Mega.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </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"> <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> <value>..\favicons\yourls.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -310,4 +307,7 @@
<data name="AmazonS3" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\favicons\AmazonS3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </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> </root>

View file

@ -358,7 +358,6 @@
<None Include="Favicons\Dropbox.ico" /> <None Include="Favicons\Dropbox.ico" />
<None Include="Favicons\Flickr.ico" /> <None Include="Favicons\Flickr.ico" />
<None Include="Favicons\Gett.ico" /> <None Include="Favicons\Gett.ico" />
<None Include="Favicons\Gist.ico" />
<None Include="Favicons\Google.ico" /> <None Include="Favicons\Google.ico" />
<None Include="Favicons\GoogleDrive.ico" /> <None Include="Favicons\GoogleDrive.ico" />
<None Include="Favicons\ImageShack.ico" /> <None Include="Favicons\ImageShack.ico" />
@ -424,6 +423,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Favicons\AmazonS3.ico" /> <Content Include="Favicons\AmazonS3.ico" />
<None Include="Favicons\GitHub.ico" />
<Content Include="Favicons\Pushbullet.ico" /> <Content Include="Favicons\Pushbullet.ico" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />