From 7d5517b8a0f10147181712eb3daab1fdedd8f317 Mon Sep 17 00:00:00 2001 From: michalx2 Date: Wed, 23 Jul 2014 00:32:14 +0200 Subject: [PATCH 1/2] Add MediaFire support --- ShareX/UploadTask.cs | 5 + UploadersLib/APIKeys/APIKeys.cs | 2 + UploadersLib/Enums.cs | 4 +- UploadersLib/Favicons/MediaFire.ico | Bin 0 -> 67646 bytes UploadersLib/FileUploaders/MediaFire.cs | 198 ++++++++++++++++++ .../Forms/UploadersConfigForm.Designer.cs | 182 +++++++++++----- UploadersLib/Forms/UploadersConfigForm.cs | 28 +++ UploadersLib/Properties/Resources.Designer.cs | 10 + UploadersLib/Properties/Resources.resx | 3 + UploadersLib/UploadersConfig.cs | 8 + UploadersLib/UploadersLib.csproj | 2 + 11 files changed, 393 insertions(+), 49 deletions(-) create mode 100644 UploadersLib/Favicons/MediaFire.ico create mode 100644 UploadersLib/FileUploaders/MediaFire.cs diff --git a/ShareX/UploadTask.cs b/ShareX/UploadTask.cs index 2b00c7146..d9f34cf36 100644 --- a/ShareX/UploadTask.cs +++ b/ShareX/UploadTask.cs @@ -940,6 +940,11 @@ public UploadResult UploadFile(Stream stream, string fileName) case FileDestination.MediaCrush: fileUploader = new MediaCrushUploader(); break; + case FileDestination.MediaFire: + fileUploader = new MediaFire(APIKeys.MediaFireAppId, APIKeys.MediaFireApiKey, + Program.UploadersConfig.MediaFireUsername, Program.UploadersConfig.MediaFirePassword, + NameParser.Parse(NameParserType.URL, Program.UploadersConfig.MediaFirePath)); + break; } if (fileUploader != null) diff --git a/UploadersLib/APIKeys/APIKeys.cs b/UploadersLib/APIKeys/APIKeys.cs index b71803cce..18a89a3a4 100644 --- a/UploadersLib/APIKeys/APIKeys.cs +++ b/UploadersLib/APIKeys/APIKeys.cs @@ -52,6 +52,8 @@ public static partial class APIKeys public static string SendSpaceKey = ""; public static string Ge_ttKey = ""; public static string JiraConsumerKey = ""; + public static string MediaFireAppId = ""; + public static string MediaFireApiKey = ""; // Text Uploaders public static string PastebinKey = ""; diff --git a/UploadersLib/Enums.cs b/UploadersLib/Enums.cs index 4e97b9b07..dd2e413b7 100644 --- a/UploadersLib/Enums.cs +++ b/UploadersLib/Enums.cs @@ -117,7 +117,9 @@ public enum FileDestination [Description("Email")] Email, [Description("Custom file uploader")] - CustomFileUploader + CustomFileUploader, + [Description("MediaFire")] + MediaFire } [Description("URL shorteners"), DefaultValue(UrlShortenerType.BITLY)] diff --git a/UploadersLib/Favicons/MediaFire.ico b/UploadersLib/Favicons/MediaFire.ico new file mode 100644 index 0000000000000000000000000000000000000000..7b4acd43d39657ff3499558b5ebaedf2b9e020fc GIT binary patch literal 67646 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 + args.Add("email", _user); + args.Add("password", _pasw); + args.Add("application_id", _appId); + args.Add("token_version", "2"); + args.Add("response_format", "json"); + args.Add("signature", GetInitSignature()); + string respStr = SendRequest(HttpMethod.POST, _apiUrl + "user/get_session_token.php", args); + GetSessionTokenResponse resp = DeserializeResponse(respStr); + EnsureSuccess(resp); + if (resp.session_token == null || resp.time == null || resp.secret_key == null) + throw new IOException("Invalid response"); + _sessionToken = resp.session_token; + _signatureTime = resp.time; + _signatureKey = (int)resp.secret_key; + } + + private string SimpleUpload(Stream stream, string fileName) + { + var args = new Dictionary(); + args.Add("session_token", _sessionToken); + args.Add("path", _path); + args.Add("response_format", "json"); + args.Add("signature", GetSignature("upload/simple.php", args)); + string url = CreateQuery(_apiUrl + "upload/simple.php", args); + UploadResult res = UploadData(stream, url, fileName, "Filedata"); + if (!res.IsSuccess) throw new IOException(res.ErrorsToString()); + SimpleUploadResponse resp = DeserializeResponse(res.Response); + EnsureSuccess(resp); + if (resp.doupload.result != 0 || resp.doupload.key == null) throw new IOException("Invalid response"); + return resp.doupload.key; + } + + private string PollUpload(string uploadKey, string fileName) + { + var args = new Dictionary(); + args.Add("session_token", _sessionToken); + args.Add("key", uploadKey); + args.Add("filename", fileName); + args.Add("response_format", "json"); + args.Add("signature", GetSignature("upload/poll_upload.php", args)); + string respStr = SendRequest(HttpMethod.POST, _apiUrl + "upload/poll_upload.php", args); + PollUploadResponse resp = DeserializeResponse(respStr); + EnsureSuccess(resp); + if (resp.doupload.result == null || resp.doupload.status == null) throw new IOException("Invalid response"); + if (resp.doupload.result != 0 || resp.doupload.fileerror != null) { + throw new IOException(string.Format("Couldn't upload the file: {0}", resp.doupload.description + ?? "Unknown error")); + } + if (resp.doupload.status == 99) { + if (resp.doupload.quickkey == null) throw new IOException("Invalid response"); + return resp.doupload.quickkey; + } + return null; + } + + private void EnsureSuccess(MFResponse resp) + { + if (resp.result != "Success") + throw new IOException(string.Format("Couldn't upload the file: {0}", resp.message ?? "Unknown error")); + if (resp.new_key == "yes") NextSignatureKey(); + } + + private string GetInitSignature() + { + string signatureStr = _user + _pasw + _appId + _apiKey; + byte[] signatureBytes = Encoding.ASCII.GetBytes(signatureStr); + System.Security.Cryptography.SHA1 sha1Gen = System.Security.Cryptography.SHA1.Create(); + byte[] sha1Bytes = sha1Gen.ComputeHash(signatureBytes); + return BytesToString(sha1Bytes); + } + + private string GetSignature(string urlSuffix, Dictionary args) + { + string keyStr = (_signatureKey % 256).ToString(System.Globalization.CultureInfo.InvariantCulture); + string urlStr = CreateNonEscapedQuery("/api/" + urlSuffix, args); + string signatureStr = keyStr + _signatureTime + urlStr; + byte[] signatureBytes = Encoding.ASCII.GetBytes(signatureStr); + System.Security.Cryptography.MD5 md5gen = System.Security.Cryptography.MD5.Create(); + byte[] md5Bytes = md5gen.ComputeHash(signatureBytes); + return BytesToString(md5Bytes); + } + + void NextSignatureKey() + { + _signatureKey = (int)(((long)_signatureKey * 16807) % 2147483647); + } + + private T DeserializeResponse(string s) where T : new() + { + var refObj = new { response = new T() }; + var obj = JsonConvert.DeserializeObject(s, refObj.GetType()); + return (T)obj.GetType().GetProperty("response").GetValue(obj, null); + } + + private static char IntToChar(int x) + { + if (x < 10) return (char)(x + '0'); + return (char)(x - 10 + 'a'); + } + + private static string BytesToString(byte[] b) + { + char[] res = new char[b.Length * 2]; + for (int i = 0; i < b.Length; ++i) { + res[2 * i] = IntToChar(b[i] >> 4); + res[2 * i + 1] = IntToChar(b[i] & 0xf); + } + return new string(res); + } + + private static string CreateNonEscapedQuery(string url, Dictionary args) + { + if (args != null && args.Count > 0) + return url + "?" + string.Join("&", args.Select(x => x.Key + "=" + x.Value).ToArray()); + return url; + } + + private class MFResponse + { + public string result { get; set; } + public int? error { get; set; } + public string message { get; set; } + public string new_key { get; set; } + } + + private class GetSessionTokenResponse : MFResponse + { + public string session_token { get; set; } + public int? secret_key { get; set; } + public string time { get; set; } + } + + private class SimpleUploadResponse : MFResponse + { + public DoUpload doupload { get; set; } + + public class DoUpload + { + public int? result { get; set; } + public string key { get; set; } + } + } + + private class PollUploadResponse : MFResponse + { + public DoUpload doupload { get; set; } + + public class DoUpload + { + public int? result { get; set; } + public int? status { get; set; } + public string description { get; set; } + public int? fileerror { get; set; } + public string quickkey { get; set; } + } + } + } +} diff --git a/UploadersLib/Forms/UploadersConfigForm.Designer.cs b/UploadersLib/Forms/UploadersConfigForm.Designer.cs index 7139ada2d..8d444d04f 100644 --- a/UploadersLib/Forms/UploadersConfigForm.Designer.cs +++ b/UploadersLib/Forms/UploadersConfigForm.Designer.cs @@ -111,6 +111,7 @@ private void InitializeComponent() this.txtYourlsAPIURL = new System.Windows.Forms.TextBox(); this.lblYourlsAPIURL = new System.Windows.Forms.Label(); this.tpAdFly = new System.Windows.Forms.TabPage(); + this.llAdflyLink = new System.Windows.Forms.LinkLabel(); this.txtAdflyAPIUID = new System.Windows.Forms.TextBox(); this.lblAdflyAPIUID = new System.Windows.Forms.Label(); this.txtAdflyAPIKEY = new System.Windows.Forms.TextBox(); @@ -279,6 +280,11 @@ private void InitializeComponent() this.lblSharedFolderImages = new System.Windows.Forms.Label(); this.cboSharedFolderText = new System.Windows.Forms.ComboBox(); this.cboSharedFolderImages = new System.Windows.Forms.ComboBox(); + this.tpMediaFire = new System.Windows.Forms.TabPage(); + this.txtMediaFirePassword = new System.Windows.Forms.TextBox(); + this.txtMediaFireUsername = new System.Windows.Forms.TextBox(); + this.lblMediaFirePassword = new System.Windows.Forms.Label(); + this.lblMediaFireUsername = new System.Windows.Forms.Label(); this.btnCopyShowFiles = new System.Windows.Forms.Button(); this.tpTextUploaders = new System.Windows.Forms.TabPage(); this.tcTextUploaders = new System.Windows.Forms.TabControl(); @@ -359,7 +365,6 @@ private void InitializeComponent() this.tcUploaders = new System.Windows.Forms.TabControl(); this.ttlvMain = new HelpersLib.TabToListView(); this.lblWidthHint = new System.Windows.Forms.Label(); - this.llAdflyLink = new System.Windows.Forms.LinkLabel(); this.atcImgurAccountType = new UploadersLib.AccountTypeControl(); this.oauth2Imgur = new UploadersLib.OAuthControl(); this.atcTinyPicAccountType = new UploadersLib.AccountTypeControl(); @@ -379,6 +384,8 @@ private void InitializeComponent() this.atcGoogleURLShortenerAccountType = new UploadersLib.AccountTypeControl(); this.ucTwitterAccounts = new UploadersLib.AccountsControl(); this.actRapidShareAccountType = new UploadersLib.AccountTypeControl(); + this.lblMediaFirePath = new System.Windows.Forms.Label(); + this.txtMediaFirePath = new System.Windows.Forms.TextBox(); this.tpOtherUploaders.SuspendLayout(); this.tcOtherUploaders.SuspendLayout(); this.tpCustomUploaders.SuspendLayout(); @@ -417,6 +424,7 @@ private void InitializeComponent() this.tpEmail.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).BeginInit(); this.tpSharedFolder.SuspendLayout(); + this.tpMediaFire.SuspendLayout(); this.tpTextUploaders.SuspendLayout(); this.tcTextUploaders.SuspendLayout(); this.tpPastebin.SuspendLayout(); @@ -1271,6 +1279,17 @@ private void InitializeComponent() this.tpAdFly.Text = "adf.ly"; this.tpAdFly.UseVisualStyleBackColor = true; // + // llAdflyLink + // + this.llAdflyLink.AutoSize = true; + this.llAdflyLink.Location = new System.Drawing.Point(16, 15); + this.llAdflyLink.Name = "llAdflyLink"; + this.llAdflyLink.Size = new System.Drawing.Size(208, 13); + this.llAdflyLink.TabIndex = 8; + this.llAdflyLink.TabStop = true; + this.llAdflyLink.Text = "You can find your API key and UID in here"; + this.llAdflyLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llAdflyLink_LinkClicked); + // // txtAdflyAPIUID // this.txtAdflyAPIUID.Location = new System.Drawing.Point(70, 60); @@ -1336,6 +1355,7 @@ private void InitializeComponent() this.tcFileUploaders.Controls.Add(this.tpJira); this.tcFileUploaders.Controls.Add(this.tpEmail); this.tcFileUploaders.Controls.Add(this.tpSharedFolder); + this.tcFileUploaders.Controls.Add(this.tpMediaFire); this.tcFileUploaders.Dock = System.Windows.Forms.DockStyle.Fill; this.tcFileUploaders.Location = new System.Drawing.Point(3, 3); this.tcFileUploaders.Multiline = true; @@ -1356,10 +1376,10 @@ private void InitializeComponent() this.tpDropbox.Controls.Add(this.lblDropboxPathTip); this.tpDropbox.Controls.Add(this.lblDropboxPath); this.tpDropbox.Controls.Add(this.txtDropboxPath); - this.tpDropbox.Location = new System.Drawing.Point(4, 22); + this.tpDropbox.Location = new System.Drawing.Point(4, 40); this.tpDropbox.Name = "tpDropbox"; this.tpDropbox.Padding = new System.Windows.Forms.Padding(3); - this.tpDropbox.Size = new System.Drawing.Size(972, 493); + this.tpDropbox.Size = new System.Drawing.Size(972, 475); this.tpDropbox.TabIndex = 0; this.tpDropbox.Text = "Dropbox"; this.tpDropbox.UseVisualStyleBackColor = true; @@ -1464,10 +1484,10 @@ private void InitializeComponent() this.tpCopy.Controls.Add(this.lblCopyPath); this.tpCopy.Controls.Add(this.txtCopyPath); this.tpCopy.Controls.Add(this.oAuthCopy); - this.tpCopy.Location = new System.Drawing.Point(4, 22); + this.tpCopy.Location = new System.Drawing.Point(4, 40); this.tpCopy.Name = "tpCopy"; this.tpCopy.Padding = new System.Windows.Forms.Padding(3); - this.tpCopy.Size = new System.Drawing.Size(972, 493); + this.tpCopy.Size = new System.Drawing.Size(972, 475); this.tpCopy.TabIndex = 0; this.tpCopy.Text = "Copy"; this.tpCopy.UseVisualStyleBackColor = true; @@ -1550,10 +1570,10 @@ private void InitializeComponent() this.tpFTP.Controls.Add(this.cboFtpFiles); this.tpFTP.Controls.Add(this.cboFtpText); this.tpFTP.Controls.Add(this.ucFTPAccounts); - this.tpFTP.Location = new System.Drawing.Point(4, 22); + this.tpFTP.Location = new System.Drawing.Point(4, 40); this.tpFTP.Name = "tpFTP"; this.tpFTP.Padding = new System.Windows.Forms.Padding(3); - this.tpFTP.Size = new System.Drawing.Size(972, 493); + this.tpFTP.Size = new System.Drawing.Size(972, 475); this.tpFTP.TabIndex = 4; this.tpFTP.Text = "FTP"; this.tpFTP.UseVisualStyleBackColor = true; @@ -1648,9 +1668,9 @@ private void InitializeComponent() this.tpMega.Controls.Add(this.txtMegaEmail); this.tpMega.Controls.Add(this.txtMegaPassword); this.tpMega.Controls.Add(this.lblMegaPassword); - this.tpMega.Location = new System.Drawing.Point(4, 22); + this.tpMega.Location = new System.Drawing.Point(4, 40); this.tpMega.Name = "tpMega"; - this.tpMega.Size = new System.Drawing.Size(972, 493); + this.tpMega.Size = new System.Drawing.Size(972, 475); this.tpMega.TabIndex = 12; this.tpMega.Text = "Mega"; this.tpMega.UseVisualStyleBackColor = true; @@ -1776,10 +1796,10 @@ private void InitializeComponent() this.tpAmazonS3.Controls.Add(this.lblAmazonS3SecretKey); this.tpAmazonS3.Controls.Add(this.lblAmazonS3AccessKey); this.tpAmazonS3.Controls.Add(this.txtAmazonS3AccessKey); - this.tpAmazonS3.Location = new System.Drawing.Point(4, 22); + this.tpAmazonS3.Location = new System.Drawing.Point(4, 40); this.tpAmazonS3.Name = "tpAmazonS3"; this.tpAmazonS3.Padding = new System.Windows.Forms.Padding(3); - this.tpAmazonS3.Size = new System.Drawing.Size(972, 493); + this.tpAmazonS3.Size = new System.Drawing.Size(972, 475); this.tpAmazonS3.TabIndex = 13; this.tpAmazonS3.Text = "Amazon S3"; this.tpAmazonS3.UseVisualStyleBackColor = true; @@ -1937,10 +1957,10 @@ private void InitializeComponent() this.tpGoogleDrive.Controls.Add(this.btnGoogleDriveRefreshFolders); this.tpGoogleDrive.Controls.Add(this.cbGoogleDriveIsPublic); this.tpGoogleDrive.Controls.Add(this.oauth2GoogleDrive); - this.tpGoogleDrive.Location = new System.Drawing.Point(4, 22); + this.tpGoogleDrive.Location = new System.Drawing.Point(4, 40); this.tpGoogleDrive.Name = "tpGoogleDrive"; this.tpGoogleDrive.Padding = new System.Windows.Forms.Padding(3); - this.tpGoogleDrive.Size = new System.Drawing.Size(972, 493); + this.tpGoogleDrive.Size = new System.Drawing.Size(972, 475); this.tpGoogleDrive.TabIndex = 1; this.tpGoogleDrive.Text = "Google Drive"; this.tpGoogleDrive.UseVisualStyleBackColor = true; @@ -2033,10 +2053,10 @@ private void InitializeComponent() this.tpOwnCloud.Controls.Add(this.lblOwnCloudPassword); this.tpOwnCloud.Controls.Add(this.lblOwnCloudUsername); this.tpOwnCloud.Controls.Add(this.lblOwnCloudHost); - this.tpOwnCloud.Location = new System.Drawing.Point(4, 22); + this.tpOwnCloud.Location = new System.Drawing.Point(4, 40); this.tpOwnCloud.Name = "tpOwnCloud"; this.tpOwnCloud.Padding = new System.Windows.Forms.Padding(3); - this.tpOwnCloud.Size = new System.Drawing.Size(972, 493); + this.tpOwnCloud.Size = new System.Drawing.Size(972, 475); this.tpOwnCloud.TabIndex = 15; this.tpOwnCloud.Text = "ownCloud"; this.tpOwnCloud.UseVisualStyleBackColor = true; @@ -2139,10 +2159,10 @@ private void InitializeComponent() this.tpPushbullet.Controls.Add(this.btnPushbulletGetDeviceList); this.tpPushbullet.Controls.Add(this.lblPushbulletUserKey); this.tpPushbullet.Controls.Add(this.txtPushbulletUserKey); - this.tpPushbullet.Location = new System.Drawing.Point(4, 22); + this.tpPushbullet.Location = new System.Drawing.Point(4, 40); this.tpPushbullet.Name = "tpPushbullet"; this.tpPushbullet.Padding = new System.Windows.Forms.Padding(3); - this.tpPushbullet.Size = new System.Drawing.Size(972, 493); + this.tpPushbullet.Size = new System.Drawing.Size(972, 475); this.tpPushbullet.TabIndex = 14; this.tpPushbullet.Text = "Pushbullet"; this.tpPushbullet.UseVisualStyleBackColor = true; @@ -2204,10 +2224,10 @@ private void InitializeComponent() this.tpBox.Controls.Add(this.lblBoxFolderID); this.tpBox.Controls.Add(this.btnBoxRefreshFolders); this.tpBox.Controls.Add(this.oauth2Box); - this.tpBox.Location = new System.Drawing.Point(4, 22); + this.tpBox.Location = new System.Drawing.Point(4, 40); this.tpBox.Name = "tpBox"; this.tpBox.Padding = new System.Windows.Forms.Padding(3); - this.tpBox.Size = new System.Drawing.Size(972, 493); + this.tpBox.Size = new System.Drawing.Size(972, 475); this.tpBox.TabIndex = 2; this.tpBox.Text = "Box"; this.tpBox.UseVisualStyleBackColor = true; @@ -2282,10 +2302,10 @@ private void InitializeComponent() this.tpRapidShare.Controls.Add(this.lblRapidSharePremiumUsername); this.tpRapidShare.Controls.Add(this.txtRapidSharePassword); this.tpRapidShare.Controls.Add(this.txtRapidShareUsername); - this.tpRapidShare.Location = new System.Drawing.Point(4, 22); + this.tpRapidShare.Location = new System.Drawing.Point(4, 40); this.tpRapidShare.Name = "tpRapidShare"; this.tpRapidShare.Padding = new System.Windows.Forms.Padding(3); - this.tpRapidShare.Size = new System.Drawing.Size(972, 493); + this.tpRapidShare.Size = new System.Drawing.Size(972, 475); this.tpRapidShare.TabIndex = 5; this.tpRapidShare.Text = "RapidShare"; this.tpRapidShare.UseVisualStyleBackColor = true; @@ -2368,10 +2388,10 @@ private void InitializeComponent() this.tpSendSpace.Controls.Add(this.txtSendSpacePassword); this.tpSendSpace.Controls.Add(this.txtSendSpaceUserName); this.tpSendSpace.Controls.Add(this.atcSendSpaceAccountType); - this.tpSendSpace.Location = new System.Drawing.Point(4, 22); + this.tpSendSpace.Location = new System.Drawing.Point(4, 40); this.tpSendSpace.Name = "tpSendSpace"; this.tpSendSpace.Padding = new System.Windows.Forms.Padding(3); - this.tpSendSpace.Size = new System.Drawing.Size(972, 493); + this.tpSendSpace.Size = new System.Drawing.Size(972, 475); this.tpSendSpace.TabIndex = 6; this.tpSendSpace.Text = "SendSpace"; this.tpSendSpace.UseVisualStyleBackColor = true; @@ -2429,10 +2449,10 @@ private void InitializeComponent() this.tpGe_tt.Controls.Add(this.btnGe_ttLogin); this.tpGe_tt.Controls.Add(this.txtGe_ttPassword); this.tpGe_tt.Controls.Add(this.txtGe_ttEmail); - this.tpGe_tt.Location = new System.Drawing.Point(4, 22); + this.tpGe_tt.Location = new System.Drawing.Point(4, 40); this.tpGe_tt.Name = "tpGe_tt"; this.tpGe_tt.Padding = new System.Windows.Forms.Padding(3); - this.tpGe_tt.Size = new System.Drawing.Size(972, 493); + this.tpGe_tt.Size = new System.Drawing.Size(972, 475); this.tpGe_tt.TabIndex = 7; this.tpGe_tt.Text = "Ge.tt"; this.tpGe_tt.UseVisualStyleBackColor = true; @@ -2496,10 +2516,10 @@ private void InitializeComponent() this.tpHostr.Controls.Add(this.lblLocalhostrEmail); this.tpHostr.Controls.Add(this.txtLocalhostrPassword); this.tpHostr.Controls.Add(this.txtLocalhostrEmail); - this.tpHostr.Location = new System.Drawing.Point(4, 22); + this.tpHostr.Location = new System.Drawing.Point(4, 40); this.tpHostr.Name = "tpHostr"; this.tpHostr.Padding = new System.Windows.Forms.Padding(3); - this.tpHostr.Size = new System.Drawing.Size(972, 493); + this.tpHostr.Size = new System.Drawing.Size(972, 475); this.tpHostr.TabIndex = 8; this.tpHostr.Text = "Hostr"; this.tpHostr.UseVisualStyleBackColor = true; @@ -2556,10 +2576,10 @@ private void InitializeComponent() this.tpMinus.Controls.Add(this.cbMinusURLType); this.tpMinus.Controls.Add(this.gbMinusUserPass); this.tpMinus.Controls.Add(this.gbMinusUpload); - this.tpMinus.Location = new System.Drawing.Point(4, 22); + this.tpMinus.Location = new System.Drawing.Point(4, 40); this.tpMinus.Name = "tpMinus"; this.tpMinus.Padding = new System.Windows.Forms.Padding(3); - this.tpMinus.Size = new System.Drawing.Size(972, 493); + this.tpMinus.Size = new System.Drawing.Size(972, 475); this.tpMinus.TabIndex = 3; this.tpMinus.Text = "Minus"; this.tpMinus.UseVisualStyleBackColor = true; @@ -2732,9 +2752,9 @@ private void InitializeComponent() this.tpJira.Controls.Add(this.lblJiraIssuePrefix); this.tpJira.Controls.Add(this.gpJiraServer); this.tpJira.Controls.Add(this.oAuthJira); - this.tpJira.Location = new System.Drawing.Point(4, 22); + this.tpJira.Location = new System.Drawing.Point(4, 40); this.tpJira.Name = "tpJira"; - this.tpJira.Size = new System.Drawing.Size(972, 493); + this.tpJira.Size = new System.Drawing.Size(972, 475); this.tpJira.TabIndex = 11; this.tpJira.Text = "Atlassian Jira"; this.tpJira.UseVisualStyleBackColor = true; @@ -2815,10 +2835,10 @@ private void InitializeComponent() this.tpEmail.Controls.Add(this.nudEmailSmtpPort); this.tpEmail.Controls.Add(this.lblEmailSmtpPort); this.tpEmail.Controls.Add(this.txtEmailDefaultSubject); - this.tpEmail.Location = new System.Drawing.Point(4, 22); + this.tpEmail.Location = new System.Drawing.Point(4, 40); this.tpEmail.Name = "tpEmail"; this.tpEmail.Padding = new System.Windows.Forms.Padding(3); - this.tpEmail.Size = new System.Drawing.Size(972, 493); + this.tpEmail.Size = new System.Drawing.Size(972, 475); this.tpEmail.TabIndex = 10; this.tpEmail.Text = "Email"; this.tpEmail.UseVisualStyleBackColor = true; @@ -2969,10 +2989,10 @@ private void InitializeComponent() this.tpSharedFolder.Controls.Add(this.cboSharedFolderText); this.tpSharedFolder.Controls.Add(this.cboSharedFolderImages); this.tpSharedFolder.Controls.Add(this.ucLocalhostAccounts); - this.tpSharedFolder.Location = new System.Drawing.Point(4, 22); + this.tpSharedFolder.Location = new System.Drawing.Point(4, 40); this.tpSharedFolder.Name = "tpSharedFolder"; this.tpSharedFolder.Padding = new System.Windows.Forms.Padding(3); - this.tpSharedFolder.Size = new System.Drawing.Size(972, 493); + this.tpSharedFolder.Size = new System.Drawing.Size(972, 475); this.tpSharedFolder.TabIndex = 9; this.tpSharedFolder.Text = "Shared folder"; this.tpSharedFolder.UseVisualStyleBackColor = true; @@ -3034,6 +3054,57 @@ private void InitializeComponent() this.cboSharedFolderImages.TabIndex = 1; this.cboSharedFolderImages.SelectedIndexChanged += new System.EventHandler(this.cboSharedFolderImages_SelectedIndexChanged); // + // tpMediaFire + // + this.tpMediaFire.Controls.Add(this.txtMediaFirePath); + this.tpMediaFire.Controls.Add(this.lblMediaFirePath); + this.tpMediaFire.Controls.Add(this.txtMediaFirePassword); + this.tpMediaFire.Controls.Add(this.txtMediaFireUsername); + this.tpMediaFire.Controls.Add(this.lblMediaFirePassword); + this.tpMediaFire.Controls.Add(this.lblMediaFireUsername); + this.tpMediaFire.Location = new System.Drawing.Point(4, 40); + this.tpMediaFire.Name = "tpMediaFire"; + this.tpMediaFire.Padding = new System.Windows.Forms.Padding(3); + this.tpMediaFire.Size = new System.Drawing.Size(972, 475); + this.tpMediaFire.TabIndex = 16; + this.tpMediaFire.Text = "MediaFire"; + this.tpMediaFire.UseVisualStyleBackColor = true; + // + // txtMediaFirePassword + // + this.txtMediaFirePassword.Location = new System.Drawing.Point(80, 52); + this.txtMediaFirePassword.Name = "txtMediaFirePassword"; + this.txtMediaFirePassword.PasswordChar = '*'; + this.txtMediaFirePassword.Size = new System.Drawing.Size(136, 20); + this.txtMediaFirePassword.TabIndex = 3; + this.txtMediaFirePassword.TextChanged += new System.EventHandler(this.txtMediaFirePassword_TextChanged); + // + // txtMediaFireUsername + // + this.txtMediaFireUsername.Location = new System.Drawing.Point(80, 20); + this.txtMediaFireUsername.Name = "txtMediaFireUsername"; + this.txtMediaFireUsername.Size = new System.Drawing.Size(136, 20); + this.txtMediaFireUsername.TabIndex = 2; + this.txtMediaFireUsername.TextChanged += new System.EventHandler(this.txtMediaFireUsername_TextChanged); + // + // lblMediaFirePassword + // + this.lblMediaFirePassword.AutoSize = true; + this.lblMediaFirePassword.Location = new System.Drawing.Point(16, 56); + this.lblMediaFirePassword.Name = "lblMediaFirePassword"; + this.lblMediaFirePassword.Size = new System.Drawing.Size(56, 13); + this.lblMediaFirePassword.TabIndex = 1; + this.lblMediaFirePassword.Text = "Password:"; + // + // lblMediaFireUsername + // + this.lblMediaFireUsername.AutoSize = true; + this.lblMediaFireUsername.Location = new System.Drawing.Point(16, 24); + this.lblMediaFireUsername.Name = "lblMediaFireUsername"; + this.lblMediaFireUsername.Size = new System.Drawing.Size(58, 13); + this.lblMediaFireUsername.TabIndex = 0; + this.lblMediaFireUsername.Text = "Username:"; + // // btnCopyShowFiles // this.btnCopyShowFiles.Location = new System.Drawing.Point(0, 0); @@ -3858,17 +3929,6 @@ private void InitializeComponent() this.lblWidthHint.TabIndex = 1; this.lblWidthHint.Visible = false; // - // llAdflyLink - // - this.llAdflyLink.AutoSize = true; - this.llAdflyLink.Location = new System.Drawing.Point(16, 15); - this.llAdflyLink.Name = "llAdflyLink"; - this.llAdflyLink.Size = new System.Drawing.Size(208, 13); - this.llAdflyLink.TabIndex = 8; - this.llAdflyLink.TabStop = true; - this.llAdflyLink.Text = "You can find your API key and UID in here"; - this.llAdflyLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llAdflyLink_LinkClicked); - // // atcImgurAccountType // this.atcImgurAccountType.Location = new System.Drawing.Point(8, 260); @@ -3959,7 +4019,7 @@ private void InitializeComponent() this.ucFTPAccounts.Location = new System.Drawing.Point(8, 40); this.ucFTPAccounts.Margin = new System.Windows.Forms.Padding(4); this.ucFTPAccounts.Name = "ucFTPAccounts"; - this.ucFTPAccounts.Size = new System.Drawing.Size(792, 448); + this.ucFTPAccounts.Size = new System.Drawing.Size(792, 898); this.ucFTPAccounts.TabIndex = 6; // // oauth2GoogleDrive @@ -4011,7 +4071,7 @@ private void InitializeComponent() this.ucLocalhostAccounts.Location = new System.Drawing.Point(8, 40); this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4); this.ucLocalhostAccounts.Name = "ucLocalhostAccounts"; - this.ucLocalhostAccounts.Size = new System.Drawing.Size(792, 448); + this.ucLocalhostAccounts.Size = new System.Drawing.Size(792, 898); this.ucLocalhostAccounts.TabIndex = 6; // // oauth2Bitly @@ -4062,6 +4122,23 @@ private void InitializeComponent() this.actRapidShareAccountType.Size = new System.Drawing.Size(214, 29); this.actRapidShareAccountType.TabIndex = 16; // + // lblMediaFirePath + // + this.lblMediaFirePath.AutoSize = true; + this.lblMediaFirePath.Location = new System.Drawing.Point(16, 88); + this.lblMediaFirePath.Name = "lblMediaFirePath"; + this.lblMediaFirePath.Size = new System.Drawing.Size(68, 13); + this.lblMediaFirePath.TabIndex = 4; + this.lblMediaFirePath.Text = "Upload path:"; + // + // txtMediaFirePath + // + this.txtMediaFirePath.Location = new System.Drawing.Point(88, 85); + this.txtMediaFirePath.Name = "txtMediaFirePath"; + this.txtMediaFirePath.Size = new System.Drawing.Size(248, 20); + this.txtMediaFirePath.TabIndex = 5; + this.txtMediaFirePath.TextChanged += new System.EventHandler(this.txtMediaFirePath_TextChanged); + // // UploadersConfigForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -4144,6 +4221,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).EndInit(); this.tpSharedFolder.ResumeLayout(false); this.tpSharedFolder.PerformLayout(); + this.tpMediaFire.ResumeLayout(false); + this.tpMediaFire.PerformLayout(); this.tpTextUploaders.ResumeLayout(false); this.tcTextUploaders.ResumeLayout(false); this.tpPastebin.ResumeLayout(false); @@ -4529,5 +4608,12 @@ private void InitializeComponent() private System.Windows.Forms.TextBox txtAdflyAPIKEY; private System.Windows.Forms.Label lblAdflyAPIKEY; private System.Windows.Forms.LinkLabel llAdflyLink; + private System.Windows.Forms.TabPage tpMediaFire; + private System.Windows.Forms.TextBox txtMediaFirePassword; + private System.Windows.Forms.TextBox txtMediaFireUsername; + private System.Windows.Forms.Label lblMediaFirePassword; + private System.Windows.Forms.Label lblMediaFireUsername; + private System.Windows.Forms.TextBox txtMediaFirePath; + private System.Windows.Forms.Label lblMediaFirePath; } } \ No newline at end of file diff --git a/UploadersLib/Forms/UploadersConfigForm.cs b/UploadersLib/Forms/UploadersConfigForm.cs index d63ecd708..1c557f1d3 100644 --- a/UploadersLib/Forms/UploadersConfigForm.cs +++ b/UploadersLib/Forms/UploadersConfigForm.cs @@ -100,6 +100,7 @@ private void FormSettings() uploadersImageList.Images.Add("Twitter", Resources.Twitter); uploadersImageList.Images.Add("ownCloud", Resources.OwnCloud); uploadersImageList.Images.Add("AdFly", Resources.AdFly); + uploadersImageList.Images.Add("MediaFire", Resources.MediaFire); tpImageShack.ImageKey = "ImageShack"; tpTinyPic.ImageKey = "TinyPic"; @@ -134,6 +135,7 @@ private void FormSettings() tpAmazonS3.ImageKey = "AmazonS3"; tpOwnCloud.ImageKey = "ownCloud"; tpAdFly.ImageKey = "AdFly"; + tpMediaFire.ImageKey = "MediaFire"; ttlvMain.ImageList = uploadersImageList; ttlvMain.MainTabControl = tcUploaders; @@ -142,6 +144,7 @@ private void FormSettings() NameParser.CreateCodesMenu(txtDropboxPath, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn); NameParser.CreateCodesMenu(txtCopyPath, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn); NameParser.CreateCodesMenu(txtAmazonS3ObjectPrefix, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn); + NameParser.CreateCodesMenu(txtMediaFirePath, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn); NameParser.CreateCodesMenu(txtCustomUploaderArgValue, ReplacementVariables.n); txtCustomUploaderLog.AddContextMenu(); @@ -487,6 +490,12 @@ public void LoadSettings(UploadersConfig uploadersConfig) cbOwnCloudCreateShare.Checked = Config.OwnCloudCreateShare; cbOwnCloudDirectLink.Checked = Config.OwnCloudDirectLink; + // MediaFire + + txtMediaFireUsername.Text = Config.MediaFireUsername; + txtMediaFirePassword.Text = Config.MediaFirePassword; + txtMediaFirePath.Text = Config.MediaFirePath; + #endregion File uploaders #region URL Shorteners @@ -1772,6 +1781,25 @@ private void SettingsGrid_LocalhostPropertyValueChanged(object s, PropertyValueC #endregion Shared folder + #region MediaFire + + private void txtMediaFireUsername_TextChanged(object sender, EventArgs e) + { + Config.MediaFireUsername = txtMediaFireUsername.Text; + } + + private void txtMediaFirePassword_TextChanged(object sender, EventArgs e) + { + Config.MediaFirePassword = txtMediaFirePassword.Text; + } + + private void txtMediaFirePath_TextChanged(object sender, EventArgs e) + { + Config.MediaFirePath = txtMediaFirePath.Text; + } + + #endregion + #endregion File Uploaders #region URL Shorteners diff --git a/UploadersLib/Properties/Resources.Designer.cs b/UploadersLib/Properties/Resources.Designer.cs index cd983f651..9be946ad4 100644 --- a/UploadersLib/Properties/Resources.Designer.cs +++ b/UploadersLib/Properties/Resources.Designer.cs @@ -300,6 +300,16 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon MediaFire { + get { + object obj = ResourceManager.GetObject("MediaFire", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// diff --git a/UploadersLib/Properties/Resources.resx b/UploadersLib/Properties/Resources.resx index aa866d89f..b31b15bdd 100644 --- a/UploadersLib/Properties/Resources.resx +++ b/UploadersLib/Properties/Resources.resx @@ -310,4 +310,7 @@ ..\favicons\adfly.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Favicons\MediaFire.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/UploadersLib/UploadersConfig.cs b/UploadersLib/UploadersConfig.cs index f99b718ab..07d366a9c 100644 --- a/UploadersLib/UploadersConfig.cs +++ b/UploadersLib/UploadersConfig.cs @@ -217,6 +217,12 @@ public class UploadersConfig : SettingsBase public bool OwnCloudCreateShare = true; public bool OwnCloudDirectLink = false; + // MediaFire + + public string MediaFireUsername = ""; + public string MediaFirePassword = ""; + public string MediaFirePath = ""; + #endregion File uploaders #region URL shorteners @@ -374,6 +380,8 @@ public bool IsValid(FileDestination destination) PushbulletSettings.DeviceList.IsValidIndex(PushbulletSettings.SelectedDevice); case FileDestination.OwnCloud: return !string.IsNullOrEmpty(OwnCloudHost) && !string.IsNullOrEmpty(OwnCloudUsername) && !string.IsNullOrEmpty(OwnCloudPassword); + case FileDestination.MediaFire: + return !string.IsNullOrEmpty(MediaFireUsername) && !string.IsNullOrEmpty(MediaFirePassword); } return true; diff --git a/UploadersLib/UploadersLib.csproj b/UploadersLib/UploadersLib.csproj index 6b4b16637..01ad35ebd 100644 --- a/UploadersLib/UploadersLib.csproj +++ b/UploadersLib/UploadersLib.csproj @@ -109,6 +109,7 @@ + @@ -426,6 +427,7 @@ + From 63a5f59c4c3fd5940c75c8a8203404d93fc4e907 Mon Sep 17 00:00:00 2001 From: michalx2 Date: Wed, 23 Jul 2014 00:58:55 +0200 Subject: [PATCH 2/2] Add MediaFire GUI --- .../Forms/UploadersConfigForm.Designer.cs | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/UploadersLib/Forms/UploadersConfigForm.Designer.cs b/UploadersLib/Forms/UploadersConfigForm.Designer.cs index 3f4e778ee..82412aafc 100644 --- a/UploadersLib/Forms/UploadersConfigForm.Designer.cs +++ b/UploadersLib/Forms/UploadersConfigForm.Designer.cs @@ -380,6 +380,13 @@ private void InitializeComponent() this.lblWidthHint = new System.Windows.Forms.Label(); this.actRapidShareAccountType = new UploadersLib.AccountTypeControl(); this.cbImgurDirectLink = new System.Windows.Forms.CheckBox(); + this.tpMediaFire = new System.Windows.Forms.TabPage(); + this.txtMediaFirePassword = new System.Windows.Forms.TextBox(); + this.txtMediaFireUsername = new System.Windows.Forms.TextBox(); + this.lblMediaFirePassword = new System.Windows.Forms.Label(); + this.lblMediaFireUsername = new System.Windows.Forms.Label(); + this.lblMediaFirePath = new System.Windows.Forms.Label(); + this.txtMediaFirePath = new System.Windows.Forms.TextBox(); this.tpOtherUploaders.SuspendLayout(); this.tcOtherUploaders.SuspendLayout(); this.tpCustomUploaders.SuspendLayout(); @@ -435,6 +442,7 @@ private void InitializeComponent() this.gbPhotobucketAlbums.SuspendLayout(); this.gbPhotobucketUserAccount.SuspendLayout(); this.tpPicasa.SuspendLayout(); + this.tpMediaFire.SuspendLayout(); this.tcUploaders.SuspendLayout(); this.SuspendLayout(); // @@ -1388,6 +1396,7 @@ private void InitializeComponent() this.tcFileUploaders.Controls.Add(this.tpJira); this.tcFileUploaders.Controls.Add(this.tpEmail); this.tcFileUploaders.Controls.Add(this.tpSharedFolder); + this.tcFileUploaders.Controls.Add(this.tpMediaFire); this.tcFileUploaders.Dock = System.Windows.Forms.DockStyle.Fill; this.tcFileUploaders.Location = new System.Drawing.Point(3, 3); this.tcFileUploaders.Multiline = true; @@ -3169,6 +3178,74 @@ private void InitializeComponent() this.ucLocalhostAccounts.Name = "ucLocalhostAccounts"; this.ucLocalhostAccounts.Size = new System.Drawing.Size(792, 448); this.ucLocalhostAccounts.TabIndex = 6; + // + // tpMediaFire + // + this.tpMediaFire.Controls.Add(this.txtMediaFirePath); + this.tpMediaFire.Controls.Add(this.lblMediaFirePath); + this.tpMediaFire.Controls.Add(this.txtMediaFirePassword); + this.tpMediaFire.Controls.Add(this.txtMediaFireUsername); + this.tpMediaFire.Controls.Add(this.lblMediaFirePassword); + this.tpMediaFire.Controls.Add(this.lblMediaFireUsername); + this.tpMediaFire.Location = new System.Drawing.Point(4, 40); + this.tpMediaFire.Name = "tpMediaFire"; + this.tpMediaFire.Padding = new System.Windows.Forms.Padding(3); + this.tpMediaFire.Size = new System.Drawing.Size(972, 475); + this.tpMediaFire.TabIndex = 16; + this.tpMediaFire.Text = "MediaFire"; + this.tpMediaFire.UseVisualStyleBackColor = true; + // + // txtMediaFirePassword + // + this.txtMediaFirePassword.Location = new System.Drawing.Point(80, 52); + this.txtMediaFirePassword.Name = "txtMediaFirePassword"; + this.txtMediaFirePassword.PasswordChar = '*'; + this.txtMediaFirePassword.Size = new System.Drawing.Size(136, 20); + this.txtMediaFirePassword.TabIndex = 3; + this.txtMediaFirePassword.TextChanged += new System.EventHandler(this.txtMediaFirePassword_TextChanged); + // + // txtMediaFireUsername + // + this.txtMediaFireUsername.Location = new System.Drawing.Point(80, 20); + this.txtMediaFireUsername.Name = "txtMediaFireUsername"; + this.txtMediaFireUsername.Size = new System.Drawing.Size(136, 20); + this.txtMediaFireUsername.TabIndex = 2; + this.txtMediaFireUsername.TextChanged += new System.EventHandler(this.txtMediaFireUsername_TextChanged); + // + // lblMediaFirePassword + // + this.lblMediaFirePassword.AutoSize = true; + this.lblMediaFirePassword.Location = new System.Drawing.Point(16, 56); + this.lblMediaFirePassword.Name = "lblMediaFirePassword"; + this.lblMediaFirePassword.Size = new System.Drawing.Size(56, 13); + this.lblMediaFirePassword.TabIndex = 1; + this.lblMediaFirePassword.Text = "Password:"; + // + // lblMediaFireUsername + // + this.lblMediaFireUsername.AutoSize = true; + this.lblMediaFireUsername.Location = new System.Drawing.Point(16, 24); + this.lblMediaFireUsername.Name = "lblMediaFireUsername"; + this.lblMediaFireUsername.Size = new System.Drawing.Size(58, 13); + this.lblMediaFireUsername.TabIndex = 0; + this.lblMediaFireUsername.Text = "Username:"; + // + // lblMediaFirePath + // + this.lblMediaFirePath.AutoSize = true; + this.lblMediaFirePath.Location = new System.Drawing.Point(16, 88); + this.lblMediaFirePath.Name = "lblMediaFirePath"; + this.lblMediaFirePath.Size = new System.Drawing.Size(68, 13); + this.lblMediaFirePath.TabIndex = 4; + this.lblMediaFirePath.Text = "Upload path:"; + // + // txtMediaFirePath + // + this.txtMediaFirePath.Location = new System.Drawing.Point(88, 85); + this.txtMediaFirePath.Name = "txtMediaFirePath"; + this.txtMediaFirePath.Size = new System.Drawing.Size(248, 20); + this.txtMediaFirePath.TabIndex = 5; + this.txtMediaFirePath.TextChanged += new System.EventHandler(this.txtMediaFirePath_TextChanged); // // btnCopyShowFiles // @@ -4157,6 +4234,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).EndInit(); this.tpSharedFolder.ResumeLayout(false); this.tpSharedFolder.PerformLayout(); + this.tpMediaFire.ResumeLayout(false); + this.tpMediaFire.PerformLayout(); this.tpTextUploaders.ResumeLayout(false); this.tcTextUploaders.ResumeLayout(false); this.tpPastebin.ResumeLayout(false); @@ -4543,5 +4622,12 @@ private void InitializeComponent() private System.Windows.Forms.Label lblAdflyAPIKEY; private System.Windows.Forms.LinkLabel llAdflyLink; private System.Windows.Forms.CheckBox cbImgurDirectLink; + private System.Windows.Forms.TabPage tpMediaFire; + private System.Windows.Forms.TextBox txtMediaFirePassword; + private System.Windows.Forms.TextBox txtMediaFireUsername; + private System.Windows.Forms.Label lblMediaFirePassword; + private System.Windows.Forms.Label lblMediaFireUsername; + private System.Windows.Forms.TextBox txtMediaFirePath; + private System.Windows.Forms.Label lblMediaFirePath; } } \ No newline at end of file