From 18fe663f025842912cb44163b456d378b2f32c94 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sun, 15 Jun 2014 13:29:09 +0300 Subject: [PATCH] Added Twitter image uploader --- .../UpdateChecker/GitHubUpdateChecker.cs | 2 +- HelpersLib/UpdateChecker/XMLUpdateChecker.cs | 2 +- ShareX/UploadTask.cs | 41 +- UploadersLib/Enums.cs | 2 + UploadersLib/GUI/TwitterMsg.Designer.cs | 47 +- UploadersLib/GUI/TwitterMsg.cs | 68 +- UploadersLib/GUI/TwitterMsg.resx | 4 +- .../GUI/UploadersConfigForm.Designer.cs | 730 +++++++++--------- UploadersLib/GUI/UploadersConfigForm.cs | 2 +- .../ImageUploaders/TwitPicUploader.cs | 2 +- .../ImageUploaders/TwitSnapsUploader.cs | 2 +- .../ImageUploaders/TwitterUploader.cs | 62 ++ UploadersLib/ImageUploaders/YfrogUploader.cs | 2 +- UploadersLib/SocialServices/Twitter.cs | 79 +- UploadersLib/UploadersConfig.cs | 2 + UploadersLib/UploadersLib.csproj | 1 + 16 files changed, 602 insertions(+), 446 deletions(-) create mode 100644 UploadersLib/ImageUploaders/TwitterUploader.cs diff --git a/HelpersLib/UpdateChecker/GitHubUpdateChecker.cs b/HelpersLib/UpdateChecker/GitHubUpdateChecker.cs index 470e9ced3..ec0d89c21 100644 --- a/HelpersLib/UpdateChecker/GitHubUpdateChecker.cs +++ b/HelpersLib/UpdateChecker/GitHubUpdateChecker.cs @@ -87,7 +87,7 @@ public override void CheckUpdate() } catch (Exception e) { - DebugHelper.WriteException(e, "Update check failed"); + DebugHelper.WriteException(e, "GitHub update check failed"); } UpdateInfo.Status = UpdateStatus.UpdateCheckFailed; diff --git a/HelpersLib/UpdateChecker/XMLUpdateChecker.cs b/HelpersLib/UpdateChecker/XMLUpdateChecker.cs index cbb8e6e08..73383c068 100644 --- a/HelpersLib/UpdateChecker/XMLUpdateChecker.cs +++ b/HelpersLib/UpdateChecker/XMLUpdateChecker.cs @@ -94,7 +94,7 @@ public override void CheckUpdate() } catch (Exception e) { - DebugHelper.WriteException(e, "Update check failed"); + DebugHelper.WriteException(e, "XML update check failed"); } UpdateInfo.Status = UpdateStatus.UpdateCheckFailed; diff --git a/ShareX/UploadTask.cs b/ShareX/UploadTask.cs index af69a2edd..dfd310cf0 100644 --- a/ShareX/UploadTask.cs +++ b/ShareX/UploadTask.cs @@ -570,17 +570,7 @@ private void DoAfterUploadJobs() if (Info.TaskSettings.AfterUploadJob.HasFlag(AfterUploadTasks.ShareURLToSocialNetworkingService)) { - OAuthInfo twitterOAuth = Program.UploadersConfig.TwitterOAuthInfoList.ReturnIfValidIndex(Program.UploadersConfig.TwitterSelectedAccount); - - if (twitterOAuth != null) - { - using (TwitterMsg twitter = new TwitterMsg(twitterOAuth)) - { - twitter.Message = Info.Result.ToString(); - twitter.Config = Program.UploadersConfig.TwitterClientConfig; - twitter.ShowDialog(); - } - } + DoSocialNetworkingService(); } if (Info.TaskSettings.AfterUploadJob.HasFlag(AfterUploadTasks.SendURLWithEmail)) @@ -686,6 +676,10 @@ public UploadResult UploadImage(Stream stream, string fileName) AlbumID = Program.UploadersConfig.PicasaAlbumID }; break; + case ImageDestination.Twitter: + OAuthInfo twitterOAuth = Program.UploadersConfig.TwitterOAuthInfoList.ReturnIfValidIndex(Program.UploadersConfig.TwitterSelectedAccount); + imageUploader = new TwitterUploader(twitterOAuth); + break; case ImageDestination.Twitpic: int indexTwitpic = Program.UploadersConfig.TwitterSelectedAccount; @@ -760,9 +754,8 @@ public UploadResult UploadText(Stream stream, string fileName) textUploader = new Paste_ee(Program.UploadersConfig.Paste_eeUserAPIKey); break; case TextDestination.Gist: - textUploader = Program.UploadersConfig.GistAnonymousLogin - ? new Gist(Program.UploadersConfig.GistPublishPublic) - : new Gist(Program.UploadersConfig.GistPublishPublic, Program.UploadersConfig.GistOAuth2Info); + textUploader = Program.UploadersConfig.GistAnonymousLogin ? new Gist(Program.UploadersConfig.GistPublishPublic) : + new Gist(Program.UploadersConfig.GistPublishPublic, Program.UploadersConfig.GistOAuth2Info); break; case TextDestination.Upaste: textUploader = new Upaste(Program.UploadersConfig.UpasteUserKey) @@ -1024,6 +1017,26 @@ public UploadResult ShortenURL(string url) return null; } + public void DoSocialNetworkingService() + { + switch (Info.TaskSettings.SocialNetworkingServiceDestination) + { + case SocialNetworkingService.Twitter: + OAuthInfo twitterOAuth = Program.UploadersConfig.TwitterOAuthInfoList.ReturnIfValidIndex(Program.UploadersConfig.TwitterSelectedAccount); + + if (twitterOAuth != null) + { + using (TwitterMsg twitter = new TwitterMsg(twitterOAuth)) + { + twitter.Message = Info.Result.ToString(); + twitter.Config = Program.UploadersConfig.TwitterClientConfig; + twitter.ShowDialog(); + } + } + break; + } + } + private void ThreadCompleted() { OnUploadCompleted(); diff --git a/UploadersLib/Enums.cs b/UploadersLib/Enums.cs index c864f3814..1fb8d7dc5 100644 --- a/UploadersLib/Enums.cs +++ b/UploadersLib/Enums.cs @@ -42,6 +42,8 @@ public enum ImageDestination Photobucket, [Description("picasaweb.google.com")] Picasa, + [Description("twitter.com")] + Twitter, [Description("twitpic.com")] Twitpic, [Description("twitsnaps.com")] diff --git a/UploadersLib/GUI/TwitterMsg.Designer.cs b/UploadersLib/GUI/TwitterMsg.Designer.cs index d8aba7948..0bc9be4aa 100644 --- a/UploadersLib/GUI/TwitterMsg.Designer.cs +++ b/UploadersLib/GUI/TwitterMsg.Designer.cs @@ -31,23 +31,23 @@ private void InitializeComponent() this.btnOK = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.txtTweet = new System.Windows.Forms.TextBox(); - this.lblCount = new System.Windows.Forms.Label(); + this.lblTweetLength = new System.Windows.Forms.Label(); this.lbUsers = new System.Windows.Forms.ListBox(); this.SuspendLayout(); // // btnOK // - this.btnOK.Location = new System.Drawing.Point(368, 232); + this.btnOK.Location = new System.Drawing.Point(368, 208); this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(81, 24); + this.btnOK.Size = new System.Drawing.Size(80, 24); this.btnOK.TabIndex = 2; - this.btnOK.Text = "&Tweet It"; + this.btnOK.Text = "&Tweet"; this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // btnCancel // - this.btnCancel.Location = new System.Drawing.Point(456, 232); + this.btnCancel.Location = new System.Drawing.Point(456, 208); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(80, 24); this.btnCancel.TabIndex = 3; @@ -59,32 +59,32 @@ private void InitializeComponent() // this.txtTweet.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtTweet.Font = new System.Drawing.Font("Calibri", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162))); - this.txtTweet.Location = new System.Drawing.Point(120, 8); - this.txtTweet.MaxLength = 140; + this.txtTweet.Location = new System.Drawing.Point(8, 8); this.txtTweet.Multiline = true; this.txtTweet.Name = "txtTweet"; - this.txtTweet.Size = new System.Drawing.Size(416, 216); - this.txtTweet.TabIndex = 1; + this.txtTweet.Size = new System.Drawing.Size(416, 192); + this.txtTweet.TabIndex = 0; this.txtTweet.TextChanged += new System.EventHandler(this.txtTweet_TextChanged); // - // lblCount + // lblTweetLength // - this.lblCount.AutoSize = true; - this.lblCount.Location = new System.Drawing.Point(120, 232); - this.lblCount.Name = "lblCount"; - this.lblCount.Size = new System.Drawing.Size(25, 13); - this.lblCount.TabIndex = 1; - this.lblCount.Text = "140"; + this.lblTweetLength.AutoSize = true; + this.lblTweetLength.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162))); + this.lblTweetLength.Location = new System.Drawing.Point(8, 208); + this.lblTweetLength.Name = "lblTweetLength"; + this.lblTweetLength.Size = new System.Drawing.Size(36, 20); + this.lblTweetLength.TabIndex = 2; + this.lblTweetLength.Text = "140"; // // lbUsers // this.lbUsers.FormattingEnabled = true; this.lbUsers.IntegralHeight = false; - this.lbUsers.Location = new System.Drawing.Point(8, 8); + this.lbUsers.Location = new System.Drawing.Point(432, 8); this.lbUsers.Name = "lbUsers"; - this.lbUsers.Size = new System.Drawing.Size(104, 216); + this.lbUsers.Size = new System.Drawing.Size(104, 192); this.lbUsers.Sorted = true; - this.lbUsers.TabIndex = 0; + this.lbUsers.TabIndex = 1; this.lbUsers.SelectedIndexChanged += new System.EventHandler(this.lbUsers_SelectedIndexChanged); this.lbUsers.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lbUsers_KeyDown); // @@ -93,21 +93,20 @@ private void InitializeComponent() this.AcceptButton = this.btnOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(544, 263); + this.ClientSize = new System.Drawing.Size(544, 240); this.Controls.Add(this.txtTweet); this.Controls.Add(this.lbUsers); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); - this.Controls.Add(this.lblCount); + this.Controls.Add(this.lblTweetLength); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "TwitterMsg"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Description"; + this.Text = "Update Twitter status"; this.TopMost = true; this.Load += new System.EventHandler(this.TwitterMsg_Load); - this.Shown += new System.EventHandler(this.TwitterMsg_Shown); this.ResumeLayout(false); this.PerformLayout(); @@ -117,7 +116,7 @@ private void InitializeComponent() private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.Label lblCount; + private System.Windows.Forms.Label lblTweetLength; private System.Windows.Forms.ListBox lbUsers; private System.Windows.Forms.TextBox txtTweet; } diff --git a/UploadersLib/GUI/TwitterMsg.cs b/UploadersLib/GUI/TwitterMsg.cs index fe80b8218..f420ed66f 100644 --- a/UploadersLib/GUI/TwitterMsg.cs +++ b/UploadersLib/GUI/TwitterMsg.cs @@ -35,8 +35,6 @@ namespace UploadersLib { public partial class TwitterMsg : Form { - public string ActiveAccountName { get; set; } - public string Message { get @@ -49,41 +47,66 @@ public string Message } } + private int length; + + public int Length + { + get + { + return length; + } + set + { + length = value; + UpdateLength(); + } + } + + public bool IsValidMessage + { + get + { + return !string.IsNullOrEmpty(Message) && Message.Length <= Length; + } + } + public OAuthInfo AuthInfo { get; set; } public TwitterClientSettings Config { get; set; } - public TwitterMsg(OAuthInfo oauth, string title) + public TwitterMsg(OAuthInfo oauth) { InitializeComponent(); AuthInfo = oauth; - Text = title; Icon = Resources.Twitter; + Length = Twitter.MessageLimit; Config = new TwitterClientSettings(); } - public TwitterMsg(OAuthInfo oauth) - : this(oauth, "Update Twitter status") + public TwitterMsg() + : this(null) { } - public TwitterMsg(string title) - : this(null, title) + private void UpdateLength() { + lblTweetLength.Text = (Length - Message.Length).ToString(); + btnOK.Enabled = IsValidMessage; } private void btnOK_Click(object sender, EventArgs e) { - if (!string.IsNullOrEmpty(txtTweet.Text)) + if (IsValidMessage) { DialogResult = DialogResult.OK; - if (AuthInfo != null && !string.IsNullOrEmpty(Message)) + if (AuthInfo != null) { Hide(); try { - TweetStatus status = new Twitter(AuthInfo).TweetMessage(Message); + TwitterStatusResponse status = new Twitter(AuthInfo).TweetMessage(Message); + if (status != null && !string.IsNullOrEmpty(status.in_reply_to_screen_name)) { Config.AddUser(status.in_reply_to_screen_name); @@ -105,9 +128,17 @@ private void btnCancel_Click(object sender, EventArgs e) Close(); } + private void TwitterMsg_Load(object sender, EventArgs e) + { + foreach (string user in Config.Addressees) + { + lbUsers.Items.Add(user); + } + } + private void txtTweet_TextChanged(object sender, EventArgs e) { - lblCount.Text = (140 - txtTweet.Text.Length).ToString(); + UpdateLength(); } private void lbUsers_SelectedIndexChanged(object sender, EventArgs e) @@ -120,14 +151,6 @@ private void lbUsers_SelectedIndexChanged(object sender, EventArgs e) } } - private void TwitterMsg_Load(object sender, EventArgs e) - { - foreach (string user in Config.Addressees) - { - lbUsers.Items.Add(user); - } - } - private void lbUsers_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) @@ -155,11 +178,6 @@ private void lbUsers_KeyDown(object sender, KeyEventArgs e) } } } - - private void TwitterMsg_Shown(object sender, EventArgs e) - { - txtTweet.Focus(); - } } public class TwitterClientSettings diff --git a/UploadersLib/GUI/TwitterMsg.resx b/UploadersLib/GUI/TwitterMsg.resx index 19dc0dd8b..d58980a38 100644 --- a/UploadersLib/GUI/TwitterMsg.resx +++ b/UploadersLib/GUI/TwitterMsg.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/UploadersLib/GUI/UploadersConfigForm.Designer.cs b/UploadersLib/GUI/UploadersConfigForm.Designer.cs index a27adbb99..07ac74474 100644 --- a/UploadersLib/GUI/UploadersConfigForm.Designer.cs +++ b/UploadersLib/GUI/UploadersConfigForm.Designer.cs @@ -93,14 +93,10 @@ private void InitializeComponent() this.txtCustomUploaderArgName = new System.Windows.Forms.TextBox(); this.tpTwitter = new System.Windows.Forms.TabPage(); this.btnTwitterLogin = new System.Windows.Forms.Button(); - this.ucTwitterAccounts = new UploadersLib.AccountsControl(); this.tpURLShorteners = new System.Windows.Forms.TabPage(); this.tcURLShorteners = new System.Windows.Forms.TabControl(); this.tpBitly = new System.Windows.Forms.TabPage(); - this.oauth2Bitly = new UploadersLib.GUI.OAuth2Control(); this.tpGoogleURLShortener = new System.Windows.Forms.TabPage(); - this.oauth2GoogleURLShortener = new UploadersLib.GUI.OAuth2Control(); - this.atcGoogleURLShortenerAccountType = new UploadersLib.GUI.AccountTypeControl(); this.tpYourls = new System.Windows.Forms.TabPage(); this.txtYourlsPassword = new System.Windows.Forms.TextBox(); this.txtYourlsUsername = new System.Windows.Forms.TextBox(); @@ -114,7 +110,6 @@ private void InitializeComponent() this.tpFileUploaders = new System.Windows.Forms.TabPage(); this.tcFileUploaders = new System.Windows.Forms.TabControl(); this.tpDropbox = new System.Windows.Forms.TabPage(); - this.oauth2Dropbox = new UploadersLib.GUI.OAuth2Control(); this.cbDropboxURLType = new System.Windows.Forms.ComboBox(); this.cbDropboxAutoCreateShareableLink = new System.Windows.Forms.CheckBox(); this.btnDropboxShowFiles = new System.Windows.Forms.Button(); @@ -125,14 +120,13 @@ private void InitializeComponent() this.lblDropboxPath = new System.Windows.Forms.Label(); this.txtDropboxPath = new System.Windows.Forms.TextBox(); this.tpCopy = new System.Windows.Forms.TabPage(); + this.pbCopyLogo = new System.Windows.Forms.PictureBox(); this.lblCopyURLType = new System.Windows.Forms.Label(); this.cbCopyURLType = new System.Windows.Forms.ComboBox(); - this.pbCopyLogo = new System.Windows.Forms.PictureBox(); this.btnCopyRegister = new System.Windows.Forms.Button(); this.lblCopyStatus = new System.Windows.Forms.Label(); this.lblCopyPath = new System.Windows.Forms.Label(); this.txtCopyPath = new System.Windows.Forms.TextBox(); - this.oAuthCopy = new UploadersLib.GUI.OAuth2Control(); this.tpFTP = new System.Windows.Forms.TabPage(); this.eiFTP = new HelpersLib.UserControls.ExportImportControl(); this.btnFtpClient = new System.Windows.Forms.Button(); @@ -142,19 +136,18 @@ private void InitializeComponent() this.cboFtpImages = new System.Windows.Forms.ComboBox(); this.cboFtpFiles = new System.Windows.Forms.ComboBox(); this.cboFtpText = new System.Windows.Forms.ComboBox(); - this.ucFTPAccounts = new UploadersLib.AccountsControl(); this.tpMega = new System.Windows.Forms.TabPage(); - this.lblMegaStatus = new System.Windows.Forms.Label(); this.btnMegaRefreshFolders = new System.Windows.Forms.Button(); + this.lblMegaStatus = new System.Windows.Forms.Label(); this.btnMegaRegister = new System.Windows.Forms.Button(); this.lblMegaFolder = new System.Windows.Forms.Label(); + this.lblMegaStatusTitle = new System.Windows.Forms.Label(); this.cbMegaFolder = new System.Windows.Forms.ComboBox(); this.lblMegaEmail = new System.Windows.Forms.Label(); - this.txtMegaEmail = new System.Windows.Forms.TextBox(); - this.lblMegaPassword = new System.Windows.Forms.Label(); - this.txtMegaPassword = new System.Windows.Forms.TextBox(); this.btnMegaLogin = new System.Windows.Forms.Button(); - this.lblMegaStatusTitle = new System.Windows.Forms.Label(); + this.txtMegaEmail = new System.Windows.Forms.TextBox(); + this.txtMegaPassword = new System.Windows.Forms.TextBox(); + this.lblMegaPassword = new System.Windows.Forms.Label(); this.tpAmazonS3 = new System.Windows.Forms.TabPage(); this.txtAmazonS3CustomDomain = new System.Windows.Forms.TextBox(); this.lblAmazonS3PathPreviewLabel = new System.Windows.Forms.Label(); @@ -179,7 +172,6 @@ private void InitializeComponent() this.txtPushbulletUserKey = new System.Windows.Forms.TextBox(); this.tpGoogleDrive = new System.Windows.Forms.TabPage(); this.cbGoogleDriveIsPublic = new System.Windows.Forms.CheckBox(); - this.oauth2GoogleDrive = new UploadersLib.GUI.OAuth2Control(); this.tpBox = new System.Windows.Forms.TabPage(); this.lblBoxFolderTip = new System.Windows.Forms.Label(); this.cbBoxShare = new System.Windows.Forms.CheckBox(); @@ -187,7 +179,6 @@ private void InitializeComponent() this.chBoxFoldersName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.lblBoxFolderID = new System.Windows.Forms.Label(); this.btnBoxRefreshFolders = new System.Windows.Forms.Button(); - this.oauth2Box = new UploadersLib.GUI.OAuth2Control(); this.tpRapidShare = new System.Windows.Forms.TabPage(); this.txtRapidShareFolderID = new System.Windows.Forms.TextBox(); this.lblRapidShareFolderID = new System.Windows.Forms.Label(); @@ -203,7 +194,6 @@ private void InitializeComponent() this.lblSendSpaceUsername = new System.Windows.Forms.Label(); this.txtSendSpacePassword = new System.Windows.Forms.TextBox(); this.txtSendSpaceUserName = new System.Windows.Forms.TextBox(); - this.atcSendSpaceAccountType = new UploadersLib.GUI.AccountTypeControl(); this.tpGe_tt = new System.Windows.Forms.TabPage(); this.lblGe_ttStatus = new System.Windows.Forms.Label(); this.lblGe_ttPassword = new System.Windows.Forms.Label(); @@ -241,7 +231,6 @@ private void InitializeComponent() this.txtJiraConfigHelp = new System.Windows.Forms.TextBox(); this.txtJiraHost = new System.Windows.Forms.TextBox(); this.lblJiraHost = new System.Windows.Forms.Label(); - this.oAuthJira = new UploadersLib.GUI.OAuth2Control(); this.tpEmail = new System.Windows.Forms.TabPage(); this.chkEmailConfirm = new System.Windows.Forms.CheckBox(); this.lblEmailSmtpServer = new System.Windows.Forms.Label(); @@ -259,7 +248,6 @@ private void InitializeComponent() this.txtEmailDefaultSubject = new System.Windows.Forms.TextBox(); this.tpSharedFolder = new System.Windows.Forms.TabPage(); this.tlpSharedFolders = new System.Windows.Forms.TableLayoutPanel(); - this.ucLocalhostAccounts = new UploadersLib.AccountsControl(); this.gbSharedFolder = new System.Windows.Forms.GroupBox(); this.lblSharedFolderFiles = new System.Windows.Forms.Label(); this.lblSharedFolderText = new System.Windows.Forms.Label(); @@ -278,8 +266,6 @@ private void InitializeComponent() this.txtPaste_eeUserAPIKey = new System.Windows.Forms.TextBox(); this.tpGist = new System.Windows.Forms.TabPage(); this.chkGistPublishPublic = new System.Windows.Forms.CheckBox(); - this.oAuth2Gist = new UploadersLib.GUI.OAuth2Control(); - this.atcGistAccountType = new UploadersLib.GUI.AccountTypeControl(); this.tpUpaste = new System.Windows.Forms.TabPage(); this.cbUpasteIsPublic = new System.Windows.Forms.CheckBox(); this.lblUpasteUserKey = new System.Windows.Forms.Label(); @@ -287,7 +273,6 @@ private void InitializeComponent() this.tpImageUploaders = new System.Windows.Forms.TabPage(); this.tcImageUploaders = new System.Windows.Forms.TabControl(); this.tpImgur = new System.Windows.Forms.TabPage(); - this.oauth2Imgur = new UploadersLib.GUI.OAuth2Control(); this.txtImgurAlbumID = new System.Windows.Forms.TextBox(); this.lblImgurAlbumID = new System.Windows.Forms.Label(); this.lvImgurAlbumList = new System.Windows.Forms.ListView(); @@ -297,9 +282,7 @@ private void InitializeComponent() this.btnImgurRefreshAlbumList = new System.Windows.Forms.Button(); this.cbImgurThumbnailType = new System.Windows.Forms.ComboBox(); this.lblImgurThumbnailType = new System.Windows.Forms.Label(); - this.atcImgurAccountType = new UploadersLib.GUI.AccountTypeControl(); this.tpImageShack = new System.Windows.Forms.TabPage(); - this.atcImageShackAccountType = new UploadersLib.GUI.AccountTypeControl(); this.btnImageShackLogin = new System.Windows.Forms.Button(); this.btnImageShackOpenPublicProfile = new System.Windows.Forms.Button(); this.cbImageShackIsPublic = new System.Windows.Forms.CheckBox(); @@ -309,7 +292,6 @@ private void InitializeComponent() this.txtImageShackPassword = new System.Windows.Forms.TextBox(); this.lblImageShackPassword = new System.Windows.Forms.Label(); this.tpTinyPic = new System.Windows.Forms.TabPage(); - this.atcTinyPicAccountType = new UploadersLib.GUI.AccountTypeControl(); this.btnTinyPicLogin = new System.Windows.Forms.Button(); this.txtTinyPicPassword = new System.Windows.Forms.TextBox(); this.lblTinyPicPassword = new System.Windows.Forms.Label(); @@ -342,6 +324,14 @@ private void InitializeComponent() this.btnPhotobucketAuthComplete = new System.Windows.Forms.Button(); this.txtPhotobucketVerificationCode = new System.Windows.Forms.TextBox(); this.lblPhotobucketAccountStatus = new System.Windows.Forms.Label(); + this.tpPicasa = new System.Windows.Forms.TabPage(); + this.txtPicasaAlbumID = new System.Windows.Forms.TextBox(); + this.lblPicasaAlbumID = new System.Windows.Forms.Label(); + this.lvPicasaAlbumList = new System.Windows.Forms.ListView(); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.btnPicasaRefreshAlbumList = new System.Windows.Forms.Button(); this.tpTwitPic = new System.Windows.Forms.TabPage(); this.lblTwitPicTip = new System.Windows.Forms.Label(); this.chkTwitPicShowFull = new System.Windows.Forms.CheckBox(); @@ -354,17 +344,27 @@ private void InitializeComponent() this.lblYFrogUsername = new System.Windows.Forms.Label(); this.txtYFrogPassword = new System.Windows.Forms.TextBox(); this.txtYFrogUsername = new System.Windows.Forms.TextBox(); - this.tpPicasa = new System.Windows.Forms.TabPage(); - this.txtPicasaAlbumID = new System.Windows.Forms.TextBox(); - this.lblPicasaAlbumID = new System.Windows.Forms.Label(); - this.lvPicasaAlbumList = new System.Windows.Forms.ListView(); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.btnPicasaRefreshAlbumList = new System.Windows.Forms.Button(); - this.oauth2Picasa = new UploadersLib.GUI.OAuth2Control(); this.tcUploaders = new System.Windows.Forms.TabControl(); this.ttlvMain = new HelpersLib.TabToListView(); + this.oauth2Imgur = new UploadersLib.GUI.OAuth2Control(); + this.atcImgurAccountType = new UploadersLib.GUI.AccountTypeControl(); + this.atcImageShackAccountType = new UploadersLib.GUI.AccountTypeControl(); + this.atcTinyPicAccountType = new UploadersLib.GUI.AccountTypeControl(); + this.oauth2Picasa = new UploadersLib.GUI.OAuth2Control(); + this.oAuth2Gist = new UploadersLib.GUI.OAuth2Control(); + this.atcGistAccountType = new UploadersLib.GUI.AccountTypeControl(); + this.oauth2Dropbox = new UploadersLib.GUI.OAuth2Control(); + this.oAuthCopy = new UploadersLib.GUI.OAuth2Control(); + this.ucFTPAccounts = new UploadersLib.AccountsControl(); + this.oauth2GoogleDrive = new UploadersLib.GUI.OAuth2Control(); + this.oauth2Box = new UploadersLib.GUI.OAuth2Control(); + this.atcSendSpaceAccountType = new UploadersLib.GUI.AccountTypeControl(); + this.oAuthJira = new UploadersLib.GUI.OAuth2Control(); + this.ucLocalhostAccounts = new UploadersLib.AccountsControl(); + this.oauth2Bitly = new UploadersLib.GUI.OAuth2Control(); + this.oauth2GoogleURLShortener = new UploadersLib.GUI.OAuth2Control(); + this.atcGoogleURLShortenerAccountType = new UploadersLib.GUI.AccountTypeControl(); + this.ucTwitterAccounts = new UploadersLib.AccountsControl(); this.actRapidShareAccountType = new UploadersLib.GUI.AccountTypeControl(); this.tpOtherUploaders.SuspendLayout(); this.tcOtherUploaders.SuspendLayout(); @@ -420,10 +420,10 @@ private void InitializeComponent() this.gbPhotobucketAlbumPath.SuspendLayout(); this.gbPhotobucketAlbums.SuspendLayout(); this.gbPhotobucketUserAccount.SuspendLayout(); + this.tpPicasa.SuspendLayout(); this.tpTwitPic.SuspendLayout(); this.tpTwitSnaps.SuspendLayout(); this.tpYFrog.SuspendLayout(); - this.tpPicasa.SuspendLayout(); this.tcUploaders.SuspendLayout(); this.SuspendLayout(); // @@ -1071,15 +1071,6 @@ private void InitializeComponent() this.btnTwitterLogin.UseVisualStyleBackColor = true; this.btnTwitterLogin.Click += new System.EventHandler(this.btnTwitterLogin_Click); // - // ucTwitterAccounts - // - this.ucTwitterAccounts.Dock = System.Windows.Forms.DockStyle.Fill; - this.ucTwitterAccounts.Location = new System.Drawing.Point(0, 0); - this.ucTwitterAccounts.Margin = new System.Windows.Forms.Padding(0); - this.ucTwitterAccounts.Name = "ucTwitterAccounts"; - this.ucTwitterAccounts.Size = new System.Drawing.Size(972, 493); - this.ucTwitterAccounts.TabIndex = 0; - // // tpURLShorteners // this.tpURLShorteners.Controls.Add(this.tcURLShorteners); @@ -1114,18 +1105,6 @@ private void InitializeComponent() this.tpBitly.Text = "bit.ly"; this.tpBitly.UseVisualStyleBackColor = true; // - // oauth2Bitly - // - this.oauth2Bitly.IsRefreshable = false; - this.oauth2Bitly.Location = new System.Drawing.Point(16, 16); - this.oauth2Bitly.LoginStatus = false; - this.oauth2Bitly.Name = "oauth2Bitly"; - this.oauth2Bitly.Size = new System.Drawing.Size(328, 168); - this.oauth2Bitly.Status = "Login required."; - this.oauth2Bitly.TabIndex = 0; - this.oauth2Bitly.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked); - this.oauth2Bitly.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked); - // // tpGoogleURLShortener // this.tpGoogleURLShortener.Controls.Add(this.oauth2GoogleURLShortener); @@ -1138,27 +1117,6 @@ private void InitializeComponent() this.tpGoogleURLShortener.Text = "Google"; this.tpGoogleURLShortener.UseVisualStyleBackColor = true; // - // oauth2GoogleURLShortener - // - this.oauth2GoogleURLShortener.Location = new System.Drawing.Point(16, 56); - this.oauth2GoogleURLShortener.LoginStatus = false; - this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener"; - this.oauth2GoogleURLShortener.Size = new System.Drawing.Size(328, 207); - this.oauth2GoogleURLShortener.Status = "Status: Login required."; - this.oauth2GoogleURLShortener.TabIndex = 1; - this.oauth2GoogleURLShortener.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked); - this.oauth2GoogleURLShortener.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked); - this.oauth2GoogleURLShortener.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked); - // - // atcGoogleURLShortenerAccountType - // - this.atcGoogleURLShortenerAccountType.Location = new System.Drawing.Point(8, 16); - this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType"; - this.atcGoogleURLShortenerAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; - this.atcGoogleURLShortenerAccountType.Size = new System.Drawing.Size(214, 29); - this.atcGoogleURLShortenerAccountType.TabIndex = 0; - this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged); - // // tpYourls // this.tpYourls.Controls.Add(this.txtYourlsPassword); @@ -1314,18 +1272,6 @@ private void InitializeComponent() this.tpDropbox.Text = "Dropbox"; this.tpDropbox.UseVisualStyleBackColor = true; // - // oauth2Dropbox - // - this.oauth2Dropbox.IsRefreshable = false; - this.oauth2Dropbox.Location = new System.Drawing.Point(16, 88); - this.oauth2Dropbox.LoginStatus = false; - this.oauth2Dropbox.Name = "oauth2Dropbox"; - this.oauth2Dropbox.Size = new System.Drawing.Size(328, 168); - this.oauth2Dropbox.Status = "Login required."; - this.oauth2Dropbox.TabIndex = 20; - this.oauth2Dropbox.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Dropbox_OpenButtonClicked); - this.oauth2Dropbox.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Dropbox_CompleteButtonClicked); - // // cbDropboxURLType // this.cbDropboxURLType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -1434,12 +1380,23 @@ private void InitializeComponent() this.tpCopy.Text = "Copy"; this.tpCopy.UseVisualStyleBackColor = true; // + // pbCopyLogo + // + this.pbCopyLogo.Cursor = System.Windows.Forms.Cursors.Hand; + this.pbCopyLogo.Image = ((System.Drawing.Image)(resources.GetObject("pbCopyLogo.Image"))); + this.pbCopyLogo.Location = new System.Drawing.Point(16, 16); + this.pbCopyLogo.Name = "pbCopyLogo"; + this.pbCopyLogo.Size = new System.Drawing.Size(216, 64); + this.pbCopyLogo.TabIndex = 19; + this.pbCopyLogo.TabStop = false; + this.pbCopyLogo.Click += new System.EventHandler(this.pbCopyLogo_Click); + // // lblCopyURLType // this.lblCopyURLType.AutoSize = true; this.lblCopyURLType.Location = new System.Drawing.Point(16, 299); this.lblCopyURLType.Name = "lblCopyURLType"; - this.lblCopyURLType.Size = new System.Drawing.Size(68, 13); + this.lblCopyURLType.Size = new System.Drawing.Size(55, 13); this.lblCopyURLType.TabIndex = 3; this.lblCopyURLType.Text = "URL type:"; // @@ -1453,17 +1410,6 @@ private void InitializeComponent() this.cbCopyURLType.TabIndex = 8; this.cbCopyURLType.SelectedIndexChanged += new System.EventHandler(this.cbCopyURLType_SelectedIndexChanged); // - // pbCopyLogo - // - this.pbCopyLogo.Cursor = System.Windows.Forms.Cursors.Hand; - this.pbCopyLogo.Image = ((System.Drawing.Image)(resources.GetObject("pbCopyLogo.Image"))); - this.pbCopyLogo.Location = new System.Drawing.Point(16, 16); - this.pbCopyLogo.Name = "pbCopyLogo"; - this.pbCopyLogo.Size = new System.Drawing.Size(216, 64); - this.pbCopyLogo.TabIndex = 19; - this.pbCopyLogo.TabStop = false; - this.pbCopyLogo.Click += new System.EventHandler(this.pbCopyLogo_Click); - // // btnCopyRegister // this.btnCopyRegister.Location = new System.Drawing.Point(240, 16); @@ -1501,18 +1447,6 @@ private void InitializeComponent() this.txtCopyPath.TabIndex = 4; this.txtCopyPath.TextChanged += new System.EventHandler(this.txtCopyPath_TextChanged); // - // oAuthCopy - // - this.oAuthCopy.IsRefreshable = false; - this.oAuthCopy.Location = new System.Drawing.Point(16, 88); - this.oAuthCopy.LoginStatus = false; - this.oAuthCopy.Name = "oAuthCopy"; - this.oAuthCopy.Size = new System.Drawing.Size(328, 173); - this.oAuthCopy.Status = "Login required."; - this.oAuthCopy.TabIndex = 2; - this.oAuthCopy.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthCopy_OpenButtonClicked); - this.oAuthCopy.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthCopy_CompleteButtonClicked); - // // tpFTP // this.tpFTP.Controls.Add(this.eiFTP); @@ -1609,16 +1543,6 @@ private void InitializeComponent() this.cboFtpText.TabIndex = 3; this.cboFtpText.SelectedIndexChanged += new System.EventHandler(this.cboFtpText_SelectedIndexChanged); // - // ucFTPAccounts - // - this.ucFTPAccounts.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - 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.TabIndex = 6; - // // tpMega // this.tpMega.Controls.Add(this.btnMegaRefreshFolders); @@ -1639,15 +1563,6 @@ private void InitializeComponent() this.tpMega.Text = "Mega"; this.tpMega.UseVisualStyleBackColor = true; // - // lblMegaStatus - // - this.lblMegaStatus.AutoSize = true; - this.lblMegaStatus.Location = new System.Drawing.Point(88, 24); - this.lblMegaStatus.Name = "lblMegaStatus"; - this.lblMegaStatus.Size = new System.Drawing.Size(186, 13); - this.lblMegaStatus.TabIndex = 0; - this.lblMegaStatus.Text = "CONFIGURED / NOT CONFIGURED"; - // // btnMegaRefreshFolders // this.btnMegaRefreshFolders.Location = new System.Drawing.Point(264, 114); @@ -1658,6 +1573,15 @@ private void InitializeComponent() this.btnMegaRefreshFolders.UseVisualStyleBackColor = true; this.btnMegaRefreshFolders.Click += new System.EventHandler(this.btnMegaRefreshFolders_Click); // + // lblMegaStatus + // + this.lblMegaStatus.AutoSize = true; + this.lblMegaStatus.Location = new System.Drawing.Point(88, 24); + this.lblMegaStatus.Name = "lblMegaStatus"; + this.lblMegaStatus.Size = new System.Drawing.Size(186, 13); + this.lblMegaStatus.TabIndex = 0; + this.lblMegaStatus.Text = "CONFIGURED / NOT CONFIGURED"; + // // btnMegaRegister // this.btnMegaRegister.Location = new System.Drawing.Point(264, 50); @@ -1677,6 +1601,15 @@ private void InitializeComponent() this.lblMegaFolder.TabIndex = 6; this.lblMegaFolder.Text = "Folder:"; // + // lblMegaStatusTitle + // + this.lblMegaStatusTitle.AutoSize = true; + this.lblMegaStatusTitle.Location = new System.Drawing.Point(24, 24); + this.lblMegaStatusTitle.Name = "lblMegaStatusTitle"; + this.lblMegaStatusTitle.Size = new System.Drawing.Size(43, 13); + this.lblMegaStatusTitle.TabIndex = 1; + this.lblMegaStatusTitle.Text = "Status: "; + // // cbMegaFolder // this.cbMegaFolder.DisplayMember = "DisplayName"; @@ -1698,30 +1631,6 @@ private void InitializeComponent() this.lblMegaEmail.TabIndex = 0; this.lblMegaEmail.Text = "Email:"; // - // txtMegaEmail - // - this.txtMegaEmail.Location = new System.Drawing.Point(88, 52); - this.txtMegaEmail.Name = "txtMegaEmail"; - this.txtMegaEmail.Size = new System.Drawing.Size(168, 20); - this.txtMegaEmail.TabIndex = 1; - // - // lblMegaPassword - // - this.lblMegaPassword.AutoSize = true; - this.lblMegaPassword.Location = new System.Drawing.Point(24, 88); - this.lblMegaPassword.Name = "lblMegaPassword"; - this.lblMegaPassword.Size = new System.Drawing.Size(56, 13); - this.lblMegaPassword.TabIndex = 3; - this.lblMegaPassword.Text = "Password:"; - // - // txtMegaPassword - // - this.txtMegaPassword.Location = new System.Drawing.Point(88, 84); - this.txtMegaPassword.Name = "txtMegaPassword"; - this.txtMegaPassword.Size = new System.Drawing.Size(168, 20); - this.txtMegaPassword.TabIndex = 4; - this.txtMegaPassword.UseSystemPasswordChar = true; - // // btnMegaLogin // this.btnMegaLogin.Location = new System.Drawing.Point(264, 82); @@ -1732,14 +1641,29 @@ private void InitializeComponent() this.btnMegaLogin.UseVisualStyleBackColor = true; this.btnMegaLogin.Click += new System.EventHandler(this.btnMegaLogin_Click); // - // lblMegaStatusTitle + // txtMegaEmail // - this.lblMegaStatusTitle.AutoSize = true; - this.lblMegaStatusTitle.Location = new System.Drawing.Point(24, 24); - this.lblMegaStatusTitle.Name = "lblMegaStatusTitle"; - this.lblMegaStatusTitle.Size = new System.Drawing.Size(43, 13); - this.lblMegaStatusTitle.TabIndex = 1; - this.lblMegaStatusTitle.Text = "Status: "; + this.txtMegaEmail.Location = new System.Drawing.Point(88, 52); + this.txtMegaEmail.Name = "txtMegaEmail"; + this.txtMegaEmail.Size = new System.Drawing.Size(168, 20); + this.txtMegaEmail.TabIndex = 1; + // + // txtMegaPassword + // + this.txtMegaPassword.Location = new System.Drawing.Point(88, 84); + this.txtMegaPassword.Name = "txtMegaPassword"; + this.txtMegaPassword.Size = new System.Drawing.Size(168, 20); + this.txtMegaPassword.TabIndex = 4; + this.txtMegaPassword.UseSystemPasswordChar = true; + // + // lblMegaPassword + // + this.lblMegaPassword.AutoSize = true; + this.lblMegaPassword.Location = new System.Drawing.Point(24, 88); + this.lblMegaPassword.Name = "lblMegaPassword"; + this.lblMegaPassword.Size = new System.Drawing.Size(56, 13); + this.lblMegaPassword.TabIndex = 3; + this.lblMegaPassword.Text = "Password:"; // // tpAmazonS3 // @@ -1999,18 +1923,6 @@ private void InitializeComponent() this.cbGoogleDriveIsPublic.UseVisualStyleBackColor = true; this.cbGoogleDriveIsPublic.CheckedChanged += new System.EventHandler(this.cbGoogleDriveIsPublic_CheckedChanged); // - // oauth2GoogleDrive - // - this.oauth2GoogleDrive.Location = new System.Drawing.Point(16, 16); - this.oauth2GoogleDrive.LoginStatus = false; - this.oauth2GoogleDrive.Name = "oauth2GoogleDrive"; - this.oauth2GoogleDrive.Size = new System.Drawing.Size(328, 207); - this.oauth2GoogleDrive.Status = "Status: Login required."; - this.oauth2GoogleDrive.TabIndex = 0; - this.oauth2GoogleDrive.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked); - this.oauth2GoogleDrive.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked); - this.oauth2GoogleDrive.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked); - // // tpBox // this.tpBox.Controls.Add(this.lblBoxFolderTip); @@ -2087,18 +1999,6 @@ private void InitializeComponent() this.btnBoxRefreshFolders.UseVisualStyleBackColor = true; this.btnBoxRefreshFolders.Click += new System.EventHandler(this.btnBoxRefreshFolders_Click); // - // oauth2Box - // - this.oauth2Box.Location = new System.Drawing.Point(16, 16); - this.oauth2Box.LoginStatus = false; - this.oauth2Box.Name = "oauth2Box"; - this.oauth2Box.Size = new System.Drawing.Size(328, 207); - this.oauth2Box.Status = "Status: Login required."; - this.oauth2Box.TabIndex = 0; - this.oauth2Box.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Box_OpenButtonClicked); - this.oauth2Box.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Box_CompleteButtonClicked); - this.oauth2Box.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Box_RefreshButtonClicked); - // // tpRapidShare // this.tpRapidShare.Controls.Add(this.txtRapidShareFolderID); @@ -2248,15 +2148,6 @@ private void InitializeComponent() this.txtSendSpaceUserName.TabIndex = 3; this.txtSendSpaceUserName.TextChanged += new System.EventHandler(this.txtSendSpaceUserName_TextChanged); // - // atcSendSpaceAccountType - // - this.atcSendSpaceAccountType.Location = new System.Drawing.Point(8, 16); - this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType"; - this.atcSendSpaceAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; - this.atcSendSpaceAccountType.Size = new System.Drawing.Size(214, 29); - this.atcSendSpaceAccountType.TabIndex = 0; - this.atcSendSpaceAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged); - // // tpGe_tt // this.tpGe_tt.Controls.Add(this.lblGe_ttStatus); @@ -2635,18 +2526,6 @@ private void InitializeComponent() this.lblJiraHost.TabIndex = 0; this.lblJiraHost.Text = "Jira host: "; // - // oAuthJira - // - this.oAuthJira.Location = new System.Drawing.Point(473, 13); - this.oAuthJira.LoginStatus = false; - this.oAuthJira.Name = "oAuthJira"; - this.oAuthJira.Size = new System.Drawing.Size(328, 207); - this.oAuthJira.Status = "Status: Login required."; - this.oAuthJira.TabIndex = 1; - this.oAuthJira.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked); - this.oAuthJira.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked); - this.oAuthJira.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked); - // // tpEmail // this.tpEmail.Controls.Add(this.chkEmailConfirm); @@ -2839,14 +2718,6 @@ private void InitializeComponent() this.tlpSharedFolders.Size = new System.Drawing.Size(966, 487); this.tlpSharedFolders.TabIndex = 0; // - // ucLocalhostAccounts - // - this.ucLocalhostAccounts.Location = new System.Drawing.Point(4, 4); - this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4); - this.ucLocalhostAccounts.Name = "ucLocalhostAccounts"; - this.ucLocalhostAccounts.Size = new System.Drawing.Size(828, 357); - this.ucLocalhostAccounts.TabIndex = 0; - // // gbSharedFolder // this.gbSharedFolder.Controls.Add(this.lblSharedFolderFiles); @@ -3036,28 +2907,6 @@ private void InitializeComponent() this.chkGistPublishPublic.UseVisualStyleBackColor = true; this.chkGistPublishPublic.CheckedChanged += new System.EventHandler(this.chkGistPublishPublic_CheckedChanged); // - // oAuth2Gist - // - this.oAuth2Gist.Enabled = false; - this.oAuth2Gist.IsRefreshable = false; - this.oAuth2Gist.Location = new System.Drawing.Point(16, 51); - this.oAuth2Gist.LoginStatus = false; - this.oAuth2Gist.Name = "oAuth2Gist"; - this.oAuth2Gist.Size = new System.Drawing.Size(328, 173); - this.oAuth2Gist.Status = "Status: Login required."; - this.oAuth2Gist.TabIndex = 2; - this.oAuth2Gist.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked); - this.oAuth2Gist.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked); - // - // atcGistAccountType - // - this.atcGistAccountType.Location = new System.Drawing.Point(15, 16); - this.atcGistAccountType.Name = "atcGistAccountType"; - this.atcGistAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; - this.atcGistAccountType.Size = new System.Drawing.Size(214, 29); - this.atcGistAccountType.TabIndex = 0; - this.atcGistAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged); - // // tpUpaste // this.tpUpaste.Controls.Add(this.cbUpasteIsPublic); @@ -3148,23 +2997,11 @@ private void InitializeComponent() this.tpImgur.Text = "Imgur"; this.tpImgur.UseVisualStyleBackColor = true; // - // oauth2Imgur - // - this.oauth2Imgur.Location = new System.Drawing.Point(16, 16); - this.oauth2Imgur.LoginStatus = false; - this.oauth2Imgur.Name = "oauth2Imgur"; - this.oauth2Imgur.Size = new System.Drawing.Size(328, 207); - this.oauth2Imgur.Status = "Status: Login required."; - this.oauth2Imgur.TabIndex = 0; - this.oauth2Imgur.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked); - this.oauth2Imgur.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked); - this.oauth2Imgur.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked); - // // txtImgurAlbumID // this.txtImgurAlbumID.Location = new System.Drawing.Point(592, 28); this.txtImgurAlbumID.Name = "txtImgurAlbumID"; - this.txtImgurAlbumID.Size = new System.Drawing.Size(176, 20); + this.txtImgurAlbumID.Size = new System.Drawing.Size(192, 20); this.txtImgurAlbumID.TabIndex = 2; this.txtImgurAlbumID.TextChanged += new System.EventHandler(this.txtImgurAlbumID_TextChanged); // @@ -3238,15 +3075,6 @@ private void InitializeComponent() this.lblImgurThumbnailType.TabIndex = 5; this.lblImgurThumbnailType.Text = "Thumbnail type:"; // - // atcImgurAccountType - // - this.atcImgurAccountType.Location = new System.Drawing.Point(8, 232); - this.atcImgurAccountType.Name = "atcImgurAccountType"; - this.atcImgurAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; - this.atcImgurAccountType.Size = new System.Drawing.Size(208, 32); - this.atcImgurAccountType.TabIndex = 4; - this.atcImgurAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged); - // // tpImageShack // this.tpImageShack.Controls.Add(this.atcImageShackAccountType); @@ -3266,15 +3094,6 @@ private void InitializeComponent() this.tpImageShack.Text = "ImageShack"; this.tpImageShack.UseVisualStyleBackColor = true; // - // atcImageShackAccountType - // - this.atcImageShackAccountType.Location = new System.Drawing.Point(8, 16); - this.atcImageShackAccountType.Name = "atcImageShackAccountType"; - this.atcImageShackAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; - this.atcImageShackAccountType.Size = new System.Drawing.Size(272, 29); - this.atcImageShackAccountType.TabIndex = 0; - this.atcImageShackAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImageShackAccountType_AccountTypeChanged); - // // btnImageShackLogin // this.btnImageShackLogin.Location = new System.Drawing.Point(296, 82); @@ -3368,15 +3187,6 @@ private void InitializeComponent() this.tpTinyPic.Text = "TinyPic"; this.tpTinyPic.UseVisualStyleBackColor = true; // - // atcTinyPicAccountType - // - this.atcTinyPicAccountType.Location = new System.Drawing.Point(8, 16); - this.atcTinyPicAccountType.Name = "atcTinyPicAccountType"; - this.atcTinyPicAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; - this.atcTinyPicAccountType.Size = new System.Drawing.Size(272, 29); - this.atcTinyPicAccountType.TabIndex = 0; - this.atcTinyPicAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged); - // // btnTinyPicLogin // this.btnTinyPicLogin.Location = new System.Drawing.Point(296, 82); @@ -3710,6 +3520,80 @@ private void InitializeComponent() this.lblPhotobucketAccountStatus.TabIndex = 6; this.lblPhotobucketAccountStatus.Text = "Login required."; // + // tpPicasa + // + this.tpPicasa.Controls.Add(this.txtPicasaAlbumID); + this.tpPicasa.Controls.Add(this.lblPicasaAlbumID); + this.tpPicasa.Controls.Add(this.lvPicasaAlbumList); + this.tpPicasa.Controls.Add(this.btnPicasaRefreshAlbumList); + this.tpPicasa.Controls.Add(this.oauth2Picasa); + this.tpPicasa.Location = new System.Drawing.Point(4, 22); + this.tpPicasa.Name = "tpPicasa"; + this.tpPicasa.Padding = new System.Windows.Forms.Padding(3); + this.tpPicasa.Size = new System.Drawing.Size(972, 493); + this.tpPicasa.TabIndex = 8; + this.tpPicasa.Text = "Picasa"; + this.tpPicasa.UseVisualStyleBackColor = true; + // + // txtPicasaAlbumID + // + this.txtPicasaAlbumID.Location = new System.Drawing.Point(592, 16); + this.txtPicasaAlbumID.Name = "txtPicasaAlbumID"; + this.txtPicasaAlbumID.Size = new System.Drawing.Size(176, 20); + this.txtPicasaAlbumID.TabIndex = 2; + this.txtPicasaAlbumID.TextChanged += new System.EventHandler(this.txtPicasaAlbumID_TextChanged); + // + // lblPicasaAlbumID + // + this.lblPicasaAlbumID.AutoSize = true; + this.lblPicasaAlbumID.Location = new System.Drawing.Point(352, 20); + this.lblPicasaAlbumID.Name = "lblPicasaAlbumID"; + this.lblPicasaAlbumID.Size = new System.Drawing.Size(233, 13); + this.lblPicasaAlbumID.TabIndex = 1; + this.lblPicasaAlbumID.Text = "Album ID for upload (Empty = No album upload):"; + // + // lvPicasaAlbumList + // + this.lvPicasaAlbumList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader3, + this.columnHeader4, + this.columnHeader5}); + this.lvPicasaAlbumList.FullRowSelect = true; + this.lvPicasaAlbumList.Location = new System.Drawing.Point(352, 76); + this.lvPicasaAlbumList.MultiSelect = false; + this.lvPicasaAlbumList.Name = "lvPicasaAlbumList"; + this.lvPicasaAlbumList.Size = new System.Drawing.Size(432, 312); + this.lvPicasaAlbumList.TabIndex = 4; + this.lvPicasaAlbumList.UseCompatibleStateImageBehavior = false; + this.lvPicasaAlbumList.View = System.Windows.Forms.View.Details; + this.lvPicasaAlbumList.SelectedIndexChanged += new System.EventHandler(this.lvPicasaAlbumList_SelectedIndexChanged); + // + // columnHeader3 + // + this.columnHeader3.Text = "ID"; + this.columnHeader3.Width = 135; + // + // columnHeader4 + // + this.columnHeader4.Text = "Name"; + this.columnHeader4.Width = 150; + // + // columnHeader5 + // + this.columnHeader5.Text = "Description"; + this.columnHeader5.Width = 143; + // + // btnPicasaRefreshAlbumList + // + this.btnPicasaRefreshAlbumList.Enabled = false; + this.btnPicasaRefreshAlbumList.Location = new System.Drawing.Point(352, 44); + this.btnPicasaRefreshAlbumList.Name = "btnPicasaRefreshAlbumList"; + this.btnPicasaRefreshAlbumList.Size = new System.Drawing.Size(200, 23); + this.btnPicasaRefreshAlbumList.TabIndex = 3; + this.btnPicasaRefreshAlbumList.Text = "Refresh album list"; + this.btnPicasaRefreshAlbumList.UseVisualStyleBackColor = true; + this.btnPicasaRefreshAlbumList.Click += new System.EventHandler(this.btnPicasaRefreshAlbumList_Click); + // // tpTwitPic // this.tpTwitPic.Controls.Add(this.lblTwitPicTip); @@ -3834,92 +3718,6 @@ private void InitializeComponent() this.txtYFrogUsername.TabIndex = 1; this.txtYFrogUsername.TextChanged += new System.EventHandler(this.txtYFrogUsername_TextChanged); // - // tpPicasa - // - this.tpPicasa.Controls.Add(this.txtPicasaAlbumID); - this.tpPicasa.Controls.Add(this.lblPicasaAlbumID); - this.tpPicasa.Controls.Add(this.lvPicasaAlbumList); - this.tpPicasa.Controls.Add(this.btnPicasaRefreshAlbumList); - this.tpPicasa.Controls.Add(this.oauth2Picasa); - this.tpPicasa.Location = new System.Drawing.Point(4, 22); - this.tpPicasa.Name = "tpPicasa"; - this.tpPicasa.Padding = new System.Windows.Forms.Padding(3); - this.tpPicasa.Size = new System.Drawing.Size(972, 493); - this.tpPicasa.TabIndex = 8; - this.tpPicasa.Text = "Picasa"; - this.tpPicasa.UseVisualStyleBackColor = true; - // - // txtPicasaAlbumID - // - this.txtPicasaAlbumID.Location = new System.Drawing.Point(592, 16); - this.txtPicasaAlbumID.Name = "txtPicasaAlbumID"; - this.txtPicasaAlbumID.Size = new System.Drawing.Size(176, 20); - this.txtPicasaAlbumID.TabIndex = 2; - this.txtPicasaAlbumID.TextChanged += new System.EventHandler(this.txtPicasaAlbumID_TextChanged); - // - // lblPicasaAlbumID - // - this.lblPicasaAlbumID.AutoSize = true; - this.lblPicasaAlbumID.Location = new System.Drawing.Point(352, 20); - this.lblPicasaAlbumID.Name = "lblPicasaAlbumID"; - this.lblPicasaAlbumID.Size = new System.Drawing.Size(233, 13); - this.lblPicasaAlbumID.TabIndex = 1; - this.lblPicasaAlbumID.Text = "Album ID for upload (Empty = No album upload):"; - // - // lvPicasaAlbumList - // - this.lvPicasaAlbumList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader3, - this.columnHeader4, - this.columnHeader5}); - this.lvPicasaAlbumList.FullRowSelect = true; - this.lvPicasaAlbumList.Location = new System.Drawing.Point(352, 76); - this.lvPicasaAlbumList.MultiSelect = false; - this.lvPicasaAlbumList.Name = "lvPicasaAlbumList"; - this.lvPicasaAlbumList.Size = new System.Drawing.Size(432, 312); - this.lvPicasaAlbumList.TabIndex = 4; - this.lvPicasaAlbumList.UseCompatibleStateImageBehavior = false; - this.lvPicasaAlbumList.View = System.Windows.Forms.View.Details; - this.lvPicasaAlbumList.SelectedIndexChanged += new System.EventHandler(this.lvPicasaAlbumList_SelectedIndexChanged); - // - // columnHeader3 - // - this.columnHeader3.Text = "ID"; - this.columnHeader3.Width = 135; - // - // columnHeader4 - // - this.columnHeader4.Text = "Name"; - this.columnHeader4.Width = 150; - // - // columnHeader5 - // - this.columnHeader5.Text = "Description"; - this.columnHeader5.Width = 143; - // - // btnPicasaRefreshAlbumList - // - this.btnPicasaRefreshAlbumList.Enabled = false; - this.btnPicasaRefreshAlbumList.Location = new System.Drawing.Point(352, 44); - this.btnPicasaRefreshAlbumList.Name = "btnPicasaRefreshAlbumList"; - this.btnPicasaRefreshAlbumList.Size = new System.Drawing.Size(200, 23); - this.btnPicasaRefreshAlbumList.TabIndex = 3; - this.btnPicasaRefreshAlbumList.Text = "Refresh album list"; - this.btnPicasaRefreshAlbumList.UseVisualStyleBackColor = true; - this.btnPicasaRefreshAlbumList.Click += new System.EventHandler(this.btnPicasaRefreshAlbumList_Click); - // - // oauth2Picasa - // - this.oauth2Picasa.Location = new System.Drawing.Point(16, 16); - this.oauth2Picasa.LoginStatus = false; - this.oauth2Picasa.Name = "oauth2Picasa"; - this.oauth2Picasa.Size = new System.Drawing.Size(328, 207); - this.oauth2Picasa.Status = "Login required."; - this.oauth2Picasa.TabIndex = 0; - this.oauth2Picasa.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked); - this.oauth2Picasa.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked); - this.oauth2Picasa.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked); - // // tcUploaders // this.tcUploaders.Controls.Add(this.tpImageUploaders); @@ -3947,6 +3745,208 @@ private void InitializeComponent() this.ttlvMain.Size = new System.Drawing.Size(994, 551); this.ttlvMain.TabIndex = 0; // + // oauth2Imgur + // + this.oauth2Imgur.Location = new System.Drawing.Point(16, 16); + this.oauth2Imgur.LoginStatus = false; + this.oauth2Imgur.Name = "oauth2Imgur"; + this.oauth2Imgur.Size = new System.Drawing.Size(328, 207); + this.oauth2Imgur.Status = "Status: Login required."; + this.oauth2Imgur.TabIndex = 0; + this.oauth2Imgur.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked); + this.oauth2Imgur.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked); + this.oauth2Imgur.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked); + // + // atcImgurAccountType + // + this.atcImgurAccountType.Location = new System.Drawing.Point(8, 232); + this.atcImgurAccountType.Name = "atcImgurAccountType"; + this.atcImgurAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; + this.atcImgurAccountType.Size = new System.Drawing.Size(208, 32); + this.atcImgurAccountType.TabIndex = 4; + this.atcImgurAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged); + // + // atcImageShackAccountType + // + this.atcImageShackAccountType.Location = new System.Drawing.Point(8, 16); + this.atcImageShackAccountType.Name = "atcImageShackAccountType"; + this.atcImageShackAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; + this.atcImageShackAccountType.Size = new System.Drawing.Size(272, 29); + this.atcImageShackAccountType.TabIndex = 0; + this.atcImageShackAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImageShackAccountType_AccountTypeChanged); + // + // atcTinyPicAccountType + // + this.atcTinyPicAccountType.Location = new System.Drawing.Point(8, 16); + this.atcTinyPicAccountType.Name = "atcTinyPicAccountType"; + this.atcTinyPicAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; + this.atcTinyPicAccountType.Size = new System.Drawing.Size(272, 29); + this.atcTinyPicAccountType.TabIndex = 0; + this.atcTinyPicAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged); + // + // oauth2Picasa + // + this.oauth2Picasa.Location = new System.Drawing.Point(16, 16); + this.oauth2Picasa.LoginStatus = false; + this.oauth2Picasa.Name = "oauth2Picasa"; + this.oauth2Picasa.Size = new System.Drawing.Size(328, 207); + this.oauth2Picasa.Status = "Login required."; + this.oauth2Picasa.TabIndex = 0; + this.oauth2Picasa.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked); + this.oauth2Picasa.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked); + this.oauth2Picasa.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked); + // + // oAuth2Gist + // + this.oAuth2Gist.Enabled = false; + this.oAuth2Gist.IsRefreshable = false; + this.oAuth2Gist.Location = new System.Drawing.Point(16, 51); + this.oAuth2Gist.LoginStatus = false; + this.oAuth2Gist.Name = "oAuth2Gist"; + this.oAuth2Gist.Size = new System.Drawing.Size(328, 173); + this.oAuth2Gist.Status = "Status: Login required."; + this.oAuth2Gist.TabIndex = 2; + this.oAuth2Gist.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked); + this.oAuth2Gist.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked); + // + // atcGistAccountType + // + this.atcGistAccountType.Location = new System.Drawing.Point(15, 16); + this.atcGistAccountType.Name = "atcGistAccountType"; + this.atcGistAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; + this.atcGistAccountType.Size = new System.Drawing.Size(214, 29); + this.atcGistAccountType.TabIndex = 0; + this.atcGistAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged); + // + // oauth2Dropbox + // + this.oauth2Dropbox.IsRefreshable = false; + this.oauth2Dropbox.Location = new System.Drawing.Point(16, 88); + this.oauth2Dropbox.LoginStatus = false; + this.oauth2Dropbox.Name = "oauth2Dropbox"; + this.oauth2Dropbox.Size = new System.Drawing.Size(328, 168); + this.oauth2Dropbox.Status = "Login required."; + this.oauth2Dropbox.TabIndex = 20; + this.oauth2Dropbox.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Dropbox_OpenButtonClicked); + this.oauth2Dropbox.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Dropbox_CompleteButtonClicked); + // + // oAuthCopy + // + this.oAuthCopy.IsRefreshable = false; + this.oAuthCopy.Location = new System.Drawing.Point(16, 88); + this.oAuthCopy.LoginStatus = false; + this.oAuthCopy.Name = "oAuthCopy"; + this.oAuthCopy.Size = new System.Drawing.Size(328, 173); + this.oAuthCopy.Status = "Login required."; + this.oAuthCopy.TabIndex = 2; + this.oAuthCopy.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthCopy_OpenButtonClicked); + this.oAuthCopy.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthCopy_CompleteButtonClicked); + // + // ucFTPAccounts + // + this.ucFTPAccounts.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + 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.TabIndex = 6; + // + // oauth2GoogleDrive + // + this.oauth2GoogleDrive.Location = new System.Drawing.Point(16, 16); + this.oauth2GoogleDrive.LoginStatus = false; + this.oauth2GoogleDrive.Name = "oauth2GoogleDrive"; + this.oauth2GoogleDrive.Size = new System.Drawing.Size(328, 207); + this.oauth2GoogleDrive.Status = "Status: Login required."; + this.oauth2GoogleDrive.TabIndex = 0; + this.oauth2GoogleDrive.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked); + this.oauth2GoogleDrive.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked); + this.oauth2GoogleDrive.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked); + // + // oauth2Box + // + this.oauth2Box.Location = new System.Drawing.Point(16, 16); + this.oauth2Box.LoginStatus = false; + this.oauth2Box.Name = "oauth2Box"; + this.oauth2Box.Size = new System.Drawing.Size(328, 207); + this.oauth2Box.Status = "Status: Login required."; + this.oauth2Box.TabIndex = 0; + this.oauth2Box.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Box_OpenButtonClicked); + this.oauth2Box.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Box_CompleteButtonClicked); + this.oauth2Box.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Box_RefreshButtonClicked); + // + // atcSendSpaceAccountType + // + this.atcSendSpaceAccountType.Location = new System.Drawing.Point(8, 16); + this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType"; + this.atcSendSpaceAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; + this.atcSendSpaceAccountType.Size = new System.Drawing.Size(214, 29); + this.atcSendSpaceAccountType.TabIndex = 0; + this.atcSendSpaceAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged); + // + // oAuthJira + // + this.oAuthJira.Location = new System.Drawing.Point(473, 13); + this.oAuthJira.LoginStatus = false; + this.oAuthJira.Name = "oAuthJira"; + this.oAuthJira.Size = new System.Drawing.Size(328, 207); + this.oAuthJira.Status = "Status: Login required."; + this.oAuthJira.TabIndex = 1; + this.oAuthJira.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked); + this.oAuthJira.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked); + this.oAuthJira.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked); + // + // ucLocalhostAccounts + // + this.ucLocalhostAccounts.Location = new System.Drawing.Point(4, 4); + this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4); + this.ucLocalhostAccounts.Name = "ucLocalhostAccounts"; + this.ucLocalhostAccounts.Size = new System.Drawing.Size(828, 357); + this.ucLocalhostAccounts.TabIndex = 0; + // + // oauth2Bitly + // + this.oauth2Bitly.IsRefreshable = false; + this.oauth2Bitly.Location = new System.Drawing.Point(16, 16); + this.oauth2Bitly.LoginStatus = false; + this.oauth2Bitly.Name = "oauth2Bitly"; + this.oauth2Bitly.Size = new System.Drawing.Size(328, 168); + this.oauth2Bitly.Status = "Login required."; + this.oauth2Bitly.TabIndex = 0; + this.oauth2Bitly.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked); + this.oauth2Bitly.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked); + // + // oauth2GoogleURLShortener + // + this.oauth2GoogleURLShortener.Location = new System.Drawing.Point(16, 56); + this.oauth2GoogleURLShortener.LoginStatus = false; + this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener"; + this.oauth2GoogleURLShortener.Size = new System.Drawing.Size(328, 207); + this.oauth2GoogleURLShortener.Status = "Status: Login required."; + this.oauth2GoogleURLShortener.TabIndex = 1; + this.oauth2GoogleURLShortener.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked); + this.oauth2GoogleURLShortener.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked); + this.oauth2GoogleURLShortener.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked); + // + // atcGoogleURLShortenerAccountType + // + this.atcGoogleURLShortenerAccountType.Location = new System.Drawing.Point(8, 16); + this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType"; + this.atcGoogleURLShortenerAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous; + this.atcGoogleURLShortenerAccountType.Size = new System.Drawing.Size(214, 29); + this.atcGoogleURLShortenerAccountType.TabIndex = 0; + this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged); + // + // ucTwitterAccounts + // + this.ucTwitterAccounts.Dock = System.Windows.Forms.DockStyle.Fill; + this.ucTwitterAccounts.Location = new System.Drawing.Point(0, 0); + this.ucTwitterAccounts.Margin = new System.Windows.Forms.Padding(0); + this.ucTwitterAccounts.Name = "ucTwitterAccounts"; + this.ucTwitterAccounts.Size = new System.Drawing.Size(972, 493); + this.ucTwitterAccounts.TabIndex = 0; + // // actRapidShareAccountType // this.actRapidShareAccountType.Location = new System.Drawing.Point(8, 16); @@ -4058,14 +4058,14 @@ private void InitializeComponent() this.gbPhotobucketAlbums.PerformLayout(); this.gbPhotobucketUserAccount.ResumeLayout(false); this.gbPhotobucketUserAccount.PerformLayout(); + this.tpPicasa.ResumeLayout(false); + this.tpPicasa.PerformLayout(); this.tpTwitPic.ResumeLayout(false); this.tpTwitPic.PerformLayout(); this.tpTwitSnaps.ResumeLayout(false); this.tpTwitSnaps.PerformLayout(); this.tpYFrog.ResumeLayout(false); this.tpYFrog.PerformLayout(); - this.tpPicasa.ResumeLayout(false); - this.tpPicasa.PerformLayout(); this.tcUploaders.ResumeLayout(false); this.ResumeLayout(false); diff --git a/UploadersLib/GUI/UploadersConfigForm.cs b/UploadersLib/GUI/UploadersConfigForm.cs index 531730c72..f71e3b654 100644 --- a/UploadersLib/GUI/UploadersConfigForm.cs +++ b/UploadersLib/GUI/UploadersConfigForm.cs @@ -45,7 +45,7 @@ public UploadersConfigForm(UploadersConfig uploadersConfig) { Config = uploadersConfig; InitializeComponent(); - string title = "ShareX - Outputs Configuration"; + string title = "ShareX - Destination settings"; if (!string.IsNullOrEmpty(Config.FilePath)) { title += " - " + Config.FilePath; diff --git a/UploadersLib/ImageUploaders/TwitPicUploader.cs b/UploadersLib/ImageUploaders/TwitPicUploader.cs index e0da87963..38b8012bc 100644 --- a/UploadersLib/ImageUploaders/TwitPicUploader.cs +++ b/UploadersLib/ImageUploaders/TwitPicUploader.cs @@ -75,7 +75,7 @@ public override UploadResult Upload(Stream stream, string fileName) case TwitPicUploadType.UPLOAD_IMAGE_ONLY: return Upload(stream, fileName, UploadLink); case TwitPicUploadType.UPLOAD_IMAGE_AND_TWITTER: - using (TwitterMsg msgBox = new TwitterMsg("Update Twitter Status")) + using (TwitterMsg msgBox = new TwitterMsg()) { msgBox.ShowDialog(); return Upload(stream, fileName, UploadAndPostLink, msgBox.Message); diff --git a/UploadersLib/ImageUploaders/TwitSnapsUploader.cs b/UploadersLib/ImageUploaders/TwitSnapsUploader.cs index 778d22a4e..a62cd9c4b 100644 --- a/UploadersLib/ImageUploaders/TwitSnapsUploader.cs +++ b/UploadersLib/ImageUploaders/TwitSnapsUploader.cs @@ -47,7 +47,7 @@ public TwitSnapsUploader(string apiKey, OAuthInfo oauth) public override UploadResult Upload(Stream stream, string fileName) { - using (TwitterMsg msgBox = new TwitterMsg("Update Twitter Status")) + using (TwitterMsg msgBox = new TwitterMsg()) { msgBox.ShowDialog(); return Upload(stream, fileName, msgBox.Message); diff --git a/UploadersLib/ImageUploaders/TwitterUploader.cs b/UploadersLib/ImageUploaders/TwitterUploader.cs new file mode 100644 index 000000000..e9dcdcc6b --- /dev/null +++ b/UploadersLib/ImageUploaders/TwitterUploader.cs @@ -0,0 +1,62 @@ +#region License Information (GPL v3) + +/* + ShareX - A program that allows you to take screenshots and share any file type + Copyright (C) 2007-2014 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 . +*/ + +#endregion License Information (GPL v3) + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using UploadersLib.HelperClasses; +using UploadersLib.SocialServices; + +namespace UploadersLib.ImageUploaders +{ + public sealed class TwitterUploader : ImageUploader + { + public OAuthInfo AuthInfo { get; set; } + + public TwitterUploader(OAuthInfo oauth) + { + AuthInfo = oauth; + } + + public override UploadResult Upload(Stream stream, string fileName) + { + using (TwitterMsg twitterMsg = new TwitterMsg()) + { + twitterMsg.Length = Twitter.MessageMediaLimit; + + if (twitterMsg.ShowDialog() == DialogResult.OK) + { + Twitter twitter = new Twitter(AuthInfo); + return twitter.TweetMessageWithMedia(twitterMsg.Message, stream, fileName); + } + } + + return new UploadResult() { IsURLExpected = false }; + } + } +} \ No newline at end of file diff --git a/UploadersLib/ImageUploaders/YfrogUploader.cs b/UploadersLib/ImageUploaders/YfrogUploader.cs index 7e157baa4..423b98fa5 100644 --- a/UploadersLib/ImageUploaders/YfrogUploader.cs +++ b/UploadersLib/ImageUploaders/YfrogUploader.cs @@ -85,7 +85,7 @@ public override UploadResult Upload(Stream stream, string fileName) case YfrogUploadType.UPLOAD_IMAGE_ONLY: return Upload(stream, fileName, ""); case YfrogUploadType.UPLOAD_IMAGE_AND_TWITTER: - using (TwitterMsg msgBox = new TwitterMsg("Update Twitter Status")) + using (TwitterMsg msgBox = new TwitterMsg()) { msgBox.ShowDialog(); return Upload(stream, fileName, msgBox.Message); diff --git a/UploadersLib/SocialServices/Twitter.cs b/UploadersLib/SocialServices/Twitter.cs index 34fb74297..049884bd1 100644 --- a/UploadersLib/SocialServices/Twitter.cs +++ b/UploadersLib/SocialServices/Twitter.cs @@ -25,6 +25,8 @@ You should have received a copy of the GNU General Public License using Newtonsoft.Json; using System.Collections.Generic; +using System.Drawing; +using System.IO; using UploadersLib.HelperClasses; namespace UploadersLib.SocialServices @@ -32,10 +34,10 @@ namespace UploadersLib.SocialServices public class Twitter : Uploader, IOAuth { private const string APIVersion = "1.1"; - private const string URLRequestToken = "https://api.twitter.com/oauth/request_token"; - private const string URLAuthorize = "https://api.twitter.com/oauth/authorize"; - private const string URLAccessToken = "https://api.twitter.com/oauth/access_token"; - private const string URLTweet = "https://api.twitter.com/" + APIVersion + "/statuses/update.json"; + private const int characters_reserved_per_media = 23; + + public const int MessageLimit = 140; + public const int MessageMediaLimit = MessageLimit - characters_reserved_per_media; public OAuthInfo AuthInfo { get; set; } @@ -46,37 +48,94 @@ public Twitter(OAuthInfo oauth) public string GetAuthorizationURL() { - return GetAuthorizationURL(URLRequestToken, URLAuthorize, AuthInfo); + return GetAuthorizationURL("https://api.twitter.com/oauth/request_token", "https://api.twitter.com/oauth/authorize", AuthInfo); } public bool GetAccessToken(string verificationCode) { AuthInfo.AuthVerifier = verificationCode; - return GetAccessToken(URLAccessToken, AuthInfo); + return GetAccessToken("https://api.twitter.com/oauth/access_token", AuthInfo); } - public TweetStatus TweetMessage(string message) + public TwitterStatusResponse TweetMessage(string message) { + if (message.Length > MessageLimit) + { + message = message.Remove(MessageLimit); + } + + string url = string.Format("https://api.twitter.com/{0}/statuses/update.json", APIVersion); + Dictionary args = new Dictionary(); args.Add("status", message); - string query = OAuthManager.GenerateQuery(URLTweet, args, HttpMethod.POST, AuthInfo); + string query = OAuthManager.GenerateQuery(url, args, HttpMethod.POST, AuthInfo); string response = SendRequest(HttpMethod.POST, query); if (!string.IsNullOrEmpty(response)) { - return JsonConvert.DeserializeObject(response); + return JsonConvert.DeserializeObject(response); } return null; } + + public UploadResult TweetMessageWithMedia(string message, Stream stream, string fileName) + { + if (message.Length > MessageMediaLimit) + { + message = message.Remove(MessageMediaLimit); + } + + string url = string.Format("https://api.twitter.com/{0}/statuses/update_with_media.json", APIVersion); + + Dictionary args = new Dictionary(); + args.Add("status", message); + + string query = OAuthManager.GenerateQuery(url, args, HttpMethod.POST, AuthInfo); + + UploadResult result = UploadData(stream, query, fileName, "media[]"); + + if (!string.IsNullOrEmpty(result.Response)) + { + TwitterStatusResponse status = JsonConvert.DeserializeObject(result.Response); + + if (status != null && status.user != null) + { + result.URL = status.GetTweetURL(); + } + } + + return result; + } + + public string GetConfiguration() + { + string url = string.Format("https://api.twitter.com/{0}/help/configuration.json", APIVersion); + string query = OAuthManager.GenerateQuery(url, null, HttpMethod.GET, AuthInfo); + string response = SendRequest(HttpMethod.GET, query); + return response; + } } - public class TweetStatus + public class TwitterStatusResponse { public long id { get; set; } public string text { get; set; } public string in_reply_to_screen_name { get; set; } + public TwitterStatusUser user { get; set; } + + public string GetTweetURL() + { + return string.Format("https://twitter.com/{0}/status/{1}", user.screen_name, id); + } + } + + public class TwitterStatusUser + { + public long id { get; set; } + public string name { get; set; } + public string screen_name { get; set; } } } \ No newline at end of file diff --git a/UploadersLib/UploadersConfig.cs b/UploadersLib/UploadersConfig.cs index dfd87056f..0a5bc2d7c 100644 --- a/UploadersLib/UploadersConfig.cs +++ b/UploadersLib/UploadersConfig.cs @@ -304,6 +304,8 @@ public bool IsActive(ImageDestination destination) return PhotobucketAccountInfo != null && OAuthInfo.CheckOAuth(PhotobucketOAuthInfo); case ImageDestination.Picasa: return OAuth2Info.CheckOAuth(PicasaOAuth2Info); + case ImageDestination.Twitter: + return TwitterOAuthInfoList != null && TwitterOAuthInfoList.IsValidIndex(TwitterSelectedAccount); case ImageDestination.Twitpic: case ImageDestination.Twitsnaps: return TwitterOAuthInfoList != null && TwitterOAuthInfoList.IsValidIndex(TwitterSelectedAccount); diff --git a/UploadersLib/UploadersLib.csproj b/UploadersLib/UploadersLib.csproj index 26607ba4c..ae2b091da 100644 --- a/UploadersLib/UploadersLib.csproj +++ b/UploadersLib/UploadersLib.csproj @@ -178,6 +178,7 @@ +