Merge pull request #805 from DanielMcAssey/feature-1

Adds LnkU.co URL Shortener
This commit is contained in:
Jaex 2015-07-20 22:17:35 +03:00
commit 5fcacbf037
11 changed files with 293 additions and 85 deletions

View file

@ -154,6 +154,8 @@ public enum UrlShortenerType
NLCM,
[Description("adf.ly")]
AdFly,
[Description("lnku.co")]
LnkU,
CustomURLShortener // Localized
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -433,6 +433,9 @@ private void InitializeComponent()
this.atcGoogleURLShortenerAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.oauthTwitter = new ShareX.UploadersLib.OAuthControl();
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.tpLnkU = new System.Windows.Forms.TabPage();
this.txtLnkUAPIKEY = new System.Windows.Forms.TextBox();
this.lblLnkUAPIKey = new System.Windows.Forms.Label();
this.tpOtherUploaders.SuspendLayout();
this.tcOtherUploaders.SuspendLayout();
this.tpTwitter.SuspendLayout();
@ -495,6 +498,7 @@ private void InitializeComponent()
this.tpPicasa.SuspendLayout();
this.tpChevereto.SuspendLayout();
this.tcUploaders.SuspendLayout();
this.tpLnkU.SuspendLayout();
this.SuspendLayout();
//
// txtRapidSharePremiumUserName
@ -1059,6 +1063,7 @@ private void InitializeComponent()
this.tcURLShorteners.Controls.Add(this.tpGoogleURLShortener);
this.tcURLShorteners.Controls.Add(this.tpYourls);
this.tcURLShorteners.Controls.Add(this.tpAdFly);
this.tcURLShorteners.Controls.Add(this.tpLnkU);
resources.ApplyResources(this.tcURLShorteners, "tcURLShorteners");
this.tcURLShorteners.Name = "tcURLShorteners";
this.tcURLShorteners.SelectedIndex = 0;
@ -3415,15 +3420,25 @@ private void InitializeComponent()
this.oauth2GoogleURLShortener.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2GoogleURLShortener_ClearButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
// tpLnkU
//
// atcGoogleURLShortenerAccountType
this.tpLnkU.Controls.Add(this.txtLnkUAPIKEY);
this.tpLnkU.Controls.Add(this.lblLnkUAPIKey);
resources.ApplyResources(this.tpLnkU, "tpLnkU");
this.tpLnkU.Name = "tpLnkU";
this.tpLnkU.UseVisualStyleBackColor = true;
//
resources.ApplyResources(this.atcGoogleURLShortenerAccountType, "atcGoogleURLShortenerAccountType");
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
// txtLnkUAPIKEY
//
// oauthTwitter
resources.ApplyResources(this.txtLnkUAPIKEY, "txtLnkUAPIKEY");
this.txtLnkUAPIKEY.Name = "txtLnkUAPIKEY";
this.txtLnkUAPIKEY.TextChanged += new System.EventHandler(this.txtLnkUAPIKEY_TextChanged);
//
resources.ApplyResources(this.oauthTwitter, "oauthTwitter");
this.oauthTwitter.IsRefreshable = false;
@ -3431,12 +3446,15 @@ private void InitializeComponent()
this.oauthTwitter.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauthTwitter_OpenButtonClicked);
this.oauthTwitter.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauthTwitter_CompleteButtonClicked);
this.oauthTwitter.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauthTwitter_ClearButtonClicked);
// lblLnkUAPIKey
//
// actRapidShareAccountType
//
resources.ApplyResources(this.actRapidShareAccountType, "actRapidShareAccountType");
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
resources.ApplyResources(this.lblLnkUAPIKey, "lblLnkUAPIKey");
this.lblLnkUAPIKey.Name = "lblLnkUAPIKey";
//
// UploadersConfigForm
//
@ -3557,6 +3575,8 @@ private void InitializeComponent()
this.tpChevereto.ResumeLayout(false);
this.tpChevereto.PerformLayout();
this.tcUploaders.ResumeLayout(false);
this.tpLnkU.ResumeLayout(false);
this.tpLnkU.PerformLayout();
this.ResumeLayout(false);
}
@ -3965,6 +3985,9 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtUp1Key;
private System.Windows.Forms.TextBox txtUp1Host;
private System.Windows.Forms.Label lblUp1Key;
private System.Windows.Forms.Label lblUp1Host;
private System.Windows.Forms.Label lblUp1Host;
private System.Windows.Forms.TabPage tpLnkU;
private System.Windows.Forms.TextBox txtLnkUAPIKEY;
private System.Windows.Forms.Label lblLnkUAPIKey;
}
}

View file

@ -95,6 +95,7 @@ private void FormSettings()
AddIconToTab(tpImageShack, Resources.ImageShack);
AddIconToTab(tpImgur, Resources.Imgur);
AddIconToTab(tpJira, Resources.jira);
AddIconToTab(tpLnkU, Resources.LnkU);
AddIconToTab(tpMediaFire, Resources.MediaFire);
AddIconToTab(tpMega, Resources.Mega);
AddIconToTab(tpMinus, Resources.Minus);
@ -582,6 +583,10 @@ public void LoadSettings(UploadersConfig uploadersConfig)
txtAdflyAPIKEY.Text = Config.AdFlyAPIKEY;
txtAdflyAPIUID.Text = Config.AdFlyAPIUID;
// lnku.co
txtLnkUAPIKEY.Text = Config.LnkUAPIKEY;
#endregion URL Shorteners
#region Other Services
@ -2133,6 +2138,14 @@ private void llAdflyLink_LinkClicked(object sender, LinkLabelLinkClickedEventArg
#endregion adf.ly
#region LnkU.co
private void txtLnkUAPIKEY_TextChanged(object sender, EventArgs e)
{
Config.LnkUAPIKEY = txtLnkUAPIKEY.Text;
}
#endregion
#endregion URL Shorteners
#region Other Uploaders

View file

@ -462,7 +462,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpTwitter.Text" xml:space="preserve">
<value>Twitter</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpTwitter.Name" xml:space="preserve">
<value>tpTwitter</value>
</data>
@ -1485,7 +1485,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="txtCustomUploaderLog.Text" xml:space="preserve">
<value />
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;txtCustomUploaderLog.Name" xml:space="preserve">
<value>txtCustomUploaderLog</value>
</data>
@ -1647,7 +1647,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblCustomUploaderURL.Text" xml:space="preserve">
<value>URL:</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblCustomUploaderURL.Name" xml:space="preserve">
<value>lblCustomUploaderURL</value>
</data>
@ -2004,7 +2004,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpBitly.Text" xml:space="preserve">
<value>bit.ly</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpBitly.Name" xml:space="preserve">
<value>tpBitly</value>
</data>
@ -2073,7 +2073,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpGoogleURLShortener.Text" xml:space="preserve">
<value>Google</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGoogleURLShortener.Name" xml:space="preserve">
<value>tpGoogleURLShortener</value>
</data>
@ -2307,7 +2307,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblYourlsAPIURL.Text" xml:space="preserve">
<value>API URL:</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblYourlsAPIURL.Name" xml:space="preserve">
<value>lblYourlsAPIURL</value>
</data>
@ -2334,7 +2334,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpYourls.Text" xml:space="preserve">
<value>YOURLS</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpYourls.Name" xml:space="preserve">
<value>tpYourls</value>
</data>
@ -2415,7 +2415,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblAdflyAPIUID.Text" xml:space="preserve">
<value>API UID:</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblAdflyAPIUID.Name" xml:space="preserve">
<value>lblAdflyAPIUID</value>
</data>
@ -2493,7 +2493,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpAdFly.Text" xml:space="preserve">
<value>adf.ly</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpAdFly.Name" xml:space="preserve">
<value>tpAdFly</value>
</data>
@ -2506,6 +2506,81 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<data name="&gt;&gt;tpAdFly.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="txtLnkUAPIKEY.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 38</value>
</data>
<data name="txtLnkUAPIKEY.Size" type="System.Drawing.Size, System.Drawing">
<value>224, 20</value>
</data>
<data name="txtLnkUAPIKEY.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;txtLnkUAPIKEY.Name" xml:space="preserve">
<value>txtLnkUAPIKEY</value>
</data>
<data name="&gt;&gt;txtLnkUAPIKEY.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtLnkUAPIKEY.Parent" xml:space="preserve">
<value>tpLnkU</value>
</data>
<data name="&gt;&gt;txtLnkUAPIKEY.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="lblLnkUAPIKey.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblLnkUAPIKey.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblLnkUAPIKey.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 22</value>
</data>
<data name="lblLnkUAPIKey.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 13</value>
</data>
<data name="lblLnkUAPIKey.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="lblLnkUAPIKey.Text" xml:space="preserve">
<value>API key:</value>
</data>
<data name="&gt;&gt;lblLnkUAPIKey.Name" xml:space="preserve">
<value>lblLnkUAPIKey</value>
</data>
<data name="&gt;&gt;lblLnkUAPIKey.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblLnkUAPIKey.Parent" xml:space="preserve">
<value>tpLnkU</value>
</data>
<data name="&gt;&gt;lblLnkUAPIKey.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tpLnkU.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tpLnkU.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
</data>
<data name="tpLnkU.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="tpLnkU.Text" xml:space="preserve">
<value>LnkU.co</value>
</data>
<data name="&gt;&gt;tpLnkU.Name" xml:space="preserve">
<value>tpLnkU</value>
</data>
<data name="&gt;&gt;tpLnkU.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tpLnkU.Parent" xml:space="preserve">
<value>tcURLShorteners</value>
</data>
<data name="&gt;&gt;tpLnkU.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tcURLShorteners.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -2799,7 +2874,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpFTP.Text" xml:space="preserve">
<value>FTP</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpFTP.Name" xml:space="preserve">
<value>tpFTP</value>
</data>
@ -3169,20 +3244,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>8</value>
</data>
<data name="tpDropbox.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpDropbox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpDropbox.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpDropbox.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="tpDropbox.Text" xml:space="preserve">
<value>Dropbox</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpDropbox.Name" xml:space="preserve">
<value>tpDropbox</value>
</data>
@ -3301,20 +3376,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>3</value>
</data>
<data name="tpOneDrive.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpOneDrive.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpOneDrive.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpOneDrive.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="tpOneDrive.Text" xml:space="preserve">
<value>OneDrive</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpOneDrive.Name" xml:space="preserve">
<value>tpOneDrive</value>
</data>
@ -3523,20 +3598,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>6</value>
</data>
<data name="tpGoogleDrive.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpGoogleDrive.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpGoogleDrive.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpGoogleDrive.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tpGoogleDrive.Text" xml:space="preserve">
<value>Google Drive</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGoogleDrive.Name" xml:space="preserve">
<value>tpGoogleDrive</value>
</data>
@ -3718,20 +3793,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>5</value>
</data>
<data name="tpBox.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpBox.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tpBox.Text" xml:space="preserve">
<value>Box</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpBox.Name" xml:space="preserve">
<value>tpBox</value>
</data>
@ -4012,20 +4087,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>6</value>
</data>
<data name="tpCopy.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpCopy.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpCopy.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpCopy.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="tpCopy.Text" xml:space="preserve">
<value>Copy</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpCopy.Name" xml:space="preserve">
<value>tpCopy</value>
</data>
@ -4207,20 +4282,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>5</value>
</data>
<data name="tpHubic.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpHubic.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpHubic.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpHubic.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="tpHubic.Text" xml:space="preserve">
<value>hubiC</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpHubic.Name" xml:space="preserve">
<value>tpHubic</value>
</data>
@ -4328,7 +4403,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="btnAmazonS3BucketNameOpen.Text" xml:space="preserve">
<value>...</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;btnAmazonS3BucketNameOpen.Name" xml:space="preserve">
<value>btnAmazonS3BucketNameOpen</value>
</data>
@ -4355,7 +4430,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="btnAmazonS3AccessKeyOpen.Text" xml:space="preserve">
<value>...</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;btnAmazonS3AccessKeyOpen.Name" xml:space="preserve">
<value>btnAmazonS3AccessKeyOpen</value>
</data>
@ -4624,20 +4699,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>16</value>
</data>
<data name="tpAmazonS3.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpAmazonS3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpAmazonS3.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpAmazonS3.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="tpAmazonS3.Text" xml:space="preserve">
<value>Amazon S3</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpAmazonS3.Name" xml:space="preserve">
<value>tpAmazonS3</value>
</data>
@ -4945,17 +5020,17 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>10</value>
</data>
<data name="tpMega.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpMega.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpMega.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="tpMega.Text" xml:space="preserve">
<value>Mega</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMega.Name" xml:space="preserve">
<value>tpMega</value>
</data>
@ -5263,20 +5338,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>10</value>
</data>
<data name="tpOwnCloud.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpOwnCloud.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpOwnCloud.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpOwnCloud.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="tpOwnCloud.Text" xml:space="preserve">
<value>ownCloud</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpOwnCloud.Name" xml:space="preserve">
<value>tpOwnCloud</value>
</data>
@ -5476,20 +5551,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>6</value>
</data>
<data name="tpMediaFire.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpMediaFire.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpMediaFire.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpMediaFire.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="tpMediaFire.Text" xml:space="preserve">
<value>MediaFire</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMediaFire.Name" xml:space="preserve">
<value>tpMediaFire</value>
</data>
@ -5638,20 +5713,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>4</value>
</data>
<data name="tpPushbullet.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpPushbullet.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpPushbullet.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpPushbullet.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="tpPushbullet.Text" xml:space="preserve">
<value>Pushbullet</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPushbullet.Name" xml:space="preserve">
<value>tpPushbullet</value>
</data>
@ -5815,20 +5890,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>5</value>
</data>
<data name="tpSendSpace.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpSendSpace.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpSendSpace.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpSendSpace.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="tpSendSpace.Text" xml:space="preserve">
<value>SendSpace</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpSendSpace.Name" xml:space="preserve">
<value>tpSendSpace</value>
</data>
@ -6001,20 +6076,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>5</value>
</data>
<data name="tpGe_tt.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpGe_tt.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpGe_tt.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpGe_tt.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="tpGe_tt.Text" xml:space="preserve">
<value>Ge.tt</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGe_tt.Name" xml:space="preserve">
<value>tpGe_tt</value>
</data>
@ -6160,20 +6235,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>4</value>
</data>
<data name="tpHostr.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpHostr.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpHostr.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpHostr.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="tpHostr.Text" xml:space="preserve">
<value>Hostr</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpHostr.Name" xml:space="preserve">
<value>tpHostr</value>
</data>
@ -6610,20 +6685,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>3</value>
</data>
<data name="tpMinus.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpMinus.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpMinus.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpMinus.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tpMinus.Text" xml:space="preserve">
<value>Minus</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMinus.Name" xml:space="preserve">
<value>tpMinus</value>
</data>
@ -6647,7 +6722,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="txtJiraIssuePrefix.Text" xml:space="preserve">
<value>PROJECT-</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;txtJiraIssuePrefix.Name" xml:space="preserve">
<value>txtJiraIssuePrefix</value>
</data>
@ -6731,7 +6806,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="txtJiraHost.Text" xml:space="preserve">
<value>http://</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;txtJiraHost.Name" xml:space="preserve">
<value>txtJiraHost</value>
</data>
@ -6820,17 +6895,17 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>3</value>
</data>
<data name="tpJira.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpJira.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpJira.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="tpJira.Text" xml:space="preserve">
<value>Atlassian Jira</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpJira.Name" xml:space="preserve">
<value>tpJira</value>
</data>
@ -6925,20 +7000,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>2</value>
</data>
<data name="tpLambda.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
<value>4, 40</value>
</data>
<data name="tpLambda.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpLambda.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 493</value>
<value>972, 475</value>
</data>
<data name="tpLambda.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="tpLambda.Text" xml:space="preserve">
<value>Lambda</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpLambda.Name" xml:space="preserve">
<value>tpLambda</value>
</data>
@ -7079,7 +7154,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpUp1.Text" xml:space="preserve">
<value>Up1</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpUp1.Name" xml:space="preserve">
<value>tpUp1</value>
</data>
@ -8171,7 +8246,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPastebin.Text" xml:space="preserve">
<value>Pastebin</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPastebin.Name" xml:space="preserve">
<value>tpPastebin</value>
</data>
@ -8249,7 +8324,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPaste_ee.Text" xml:space="preserve">
<value>Paste.ee</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPaste_ee.Name" xml:space="preserve">
<value>tpPaste_ee</value>
</data>
@ -8348,7 +8423,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpGist.Text" xml:space="preserve">
<value>Gist</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGist.Name" xml:space="preserve">
<value>tpGist</value>
</data>
@ -8456,7 +8531,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpUpaste.Text" xml:space="preserve">
<value>uPaste</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpUpaste.Name" xml:space="preserve">
<value>tpUpaste</value>
</data>
@ -8585,7 +8660,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpHastebin.Text" xml:space="preserve">
<value>Hastebin</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpHastebin.Name" xml:space="preserve">
<value>tpHastebin</value>
</data>
@ -8753,7 +8828,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="chImgurID.Text" xml:space="preserve">
<value>ID</value>
<comment>@Invariant</comment></data>
</data>
<data name="chImgurTitle.Text" xml:space="preserve">
<value>Title</value>
</data>
@ -8882,7 +8957,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpImgur.Text" xml:space="preserve">
<value>Imgur</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpImgur.Name" xml:space="preserve">
<value>tpImgur</value>
</data>
@ -9122,7 +9197,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpImageShack.Text" xml:space="preserve">
<value>ImageShack</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpImageShack.Name" xml:space="preserve">
<value>tpImageShack</value>
</data>
@ -9326,7 +9401,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpTinyPic.Text" xml:space="preserve">
<value>TinyPic</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpTinyPic.Name" xml:space="preserve">
<value>tpTinyPic</value>
</data>
@ -9506,7 +9581,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpFlickr.Text" xml:space="preserve">
<value>Flickr</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpFlickr.Name" xml:space="preserve">
<value>tpFlickr</value>
</data>
@ -9998,7 +10073,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPhotobucket.Text" xml:space="preserve">
<value>Photobucket</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPhotobucket.Name" xml:space="preserve">
<value>tpPhotobucket</value>
</data>
@ -10064,7 +10139,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="chPicasaID.Text" xml:space="preserve">
<value>ID</value>
<comment>@Invariant</comment></data>
</data>
<data name="chPicasaID.Width" type="System.Int32, mscorlib">
<value>135</value>
</data>
@ -10166,7 +10241,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPicasa.Text" xml:space="preserve">
<value>Picasa</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPicasa.Name" xml:space="preserve">
<value>tpPicasa</value>
</data>
@ -10226,7 +10301,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblCheveretoWebsiteTip.Text" xml:space="preserve">
<value>/api/1/upload</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblCheveretoWebsiteTip.Name" xml:space="preserve">
<value>lblCheveretoWebsiteTip</value>
</data>
@ -10355,7 +10430,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpChevereto.Text" xml:space="preserve">
<value>Chevereto</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpChevereto.Name" xml:space="preserve">
<value>tpChevereto</value>
</data>
@ -10530,9 +10605,6 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>1000, 557</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>840, 572</value>
</data>

View file

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

View file

@ -461,4 +461,7 @@ Created folders:</value>
<data name="Hubic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\hubic.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LnkU" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\LnkU.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -289,6 +289,7 @@
<Compile Include="URLShorteners\CustomURLShortener.cs" />
<Compile Include="URLShorteners\GoogleURLShortener.cs" />
<Compile Include="URLShorteners\IsgdURLShortener.cs" />
<Compile Include="URLShorteners\LnkUURLShortener.cs" />
<Compile Include="URLShorteners\NlcmURLShortener.cs" />
<Compile Include="URLShorteners\TinyURLShortener.cs" />
<Compile Include="URLShorteners\TurlURLShortener.cs" />
@ -745,6 +746,10 @@
<ItemGroup>
<None Include="Favicons\Up1.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="Favicons\LnkU.ico" />
<None Include="Resources\LnkU.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<PropertyGroup>

View file

@ -0,0 +1,69 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright © 2007-2015 ShareX Developers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using Newtonsoft.Json;
using System.Collections.Generic;
namespace ShareX.UploadersLib.URLShorteners
{
public sealed class LnkUURLShortener : URLShortener
{
private const string API_ENDPOINT = "http://lnku.co/api/go/";
public string API_KEY { get; set; }
public override UploadResult ShortenURL(string url)
{
UploadResult result = new UploadResult { URL = url };
Dictionary<string, string> args = new Dictionary<string, string>();
args.Add("apikey", API_KEY);
args.Add("action", "shorten");
args.Add("fullurl", url);
string response = SendRequest(HttpMethod.GET, API_ENDPOINT, args);
if (!string.IsNullOrEmpty(response))
{
LnkUURLShortenerResponse jsonResponse = JsonConvert.DeserializeObject<LnkUURLShortenerResponse>(response);
if (jsonResponse != null)
{
result.ShortenedURL = jsonResponse.shorturl;
}
}
return result;
}
}
public class LnkUURLShortenerResponse
{
public string shortcode { get; set; }
public string site { get; set; }
public string shorturl { get; set; }
public string fullurl { get; set; }
public string title { get; set; }
}
}

View file

@ -275,6 +275,9 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public string AdFlyAPIKEY = String.Empty;
public string AdFlyAPIUID = String.Empty;
// lnku.co
public string LnkUAPIKEY = string.Empty;
#endregion URL shorteners
#region URL sharing services
@ -428,6 +431,8 @@ public bool IsValid(UrlShortenerType destination)
return !string.IsNullOrEmpty(YourlsAPIURL) && (!string.IsNullOrEmpty(YourlsSignature) || (!string.IsNullOrEmpty(YourlsUsername) && !string.IsNullOrEmpty(YourlsPassword)));
case UrlShortenerType.AdFly:
return !string.IsNullOrEmpty(AdFlyAPIKEY) && !string.IsNullOrEmpty(AdFlyAPIUID);
case UrlShortenerType.LnkU:
return !string.IsNullOrEmpty(LnkUAPIKEY);
case UrlShortenerType.CustomURLShortener:
return CustomUploadersList != null && CustomUploadersList.IsValidIndex(CustomURLShortenerSelected);
}

View file

@ -1075,6 +1075,12 @@ public UploadResult ShortenURL(string url)
APIUID = Program.UploadersConfig.AdFlyAPIUID
};
break;
case UrlShortenerType.LnkU:
urlShortener = new LnkUURLShortener
{
API_KEY = Program.UploadersConfig.LnkUAPIKEY
};
break;
case UrlShortenerType.CustomURLShortener:
CustomUploaderItem customUploader = GetCustomUploader(Program.UploadersConfig.CustomURLShortenerSelected);
if (customUploader != null)