fixed #1690: Option to use file extension for Hastebin syntax highlighting

This commit is contained in:
Jaex 2016-07-04 08:07:49 +03:00
parent a902fd5bfd
commit 740448b9dd
5 changed files with 1988 additions and 7341 deletions

View file

@ -42,7 +42,6 @@ private void InitializeComponent()
this.lblTwitterDefaultMessage = new System.Windows.Forms.Label();
this.txtTwitterDefaultMessage = new System.Windows.Forms.TextBox();
this.cbTwitterSkipMessageBox = new System.Windows.Forms.CheckBox();
this.oauthTwitter = new ShareX.UploadersLib.OAuthControl();
this.txtTwitterDescription = new System.Windows.Forms.TextBox();
this.lblTwitterDescription = new System.Windows.Forms.Label();
this.btnTwitterRemove = new System.Windows.Forms.Button();
@ -135,10 +134,7 @@ private void InitializeComponent()
this.tpBitly = new System.Windows.Forms.TabPage();
this.txtBitlyDomain = new System.Windows.Forms.TextBox();
this.lblBitlyDomain = new System.Windows.Forms.Label();
this.oauth2Bitly = new ShareX.UploadersLib.OAuthControl();
this.tpGoogleURLShortener = new System.Windows.Forms.TabPage();
this.oauth2GoogleURLShortener = new ShareX.UploadersLib.OAuthControl();
this.atcGoogleURLShortenerAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.tpYourls = new System.Windows.Forms.TabPage();
this.txtYourlsPassword = new System.Windows.Forms.TextBox();
this.txtYourlsUsername = new System.Windows.Forms.TextBox();
@ -174,9 +170,7 @@ 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 ShareX.UploadersLib.AccountsControl();
this.tpDropbox = new System.Windows.Forms.TabPage();
this.oauth2Dropbox = new ShareX.UploadersLib.OAuthControl();
this.cbDropboxURLType = new System.Windows.Forms.ComboBox();
this.cbDropboxAutoCreateShareableLink = new System.Windows.Forms.CheckBox();
this.pbDropboxLogo = new System.Windows.Forms.PictureBox();
@ -188,7 +182,6 @@ private void InitializeComponent()
this.tvOneDrive = new System.Windows.Forms.TreeView();
this.lblOneDriveFolderID = new System.Windows.Forms.Label();
this.cbOneDriveCreateShareableLink = new System.Windows.Forms.CheckBox();
this.oAuth2OneDrive = new ShareX.UploadersLib.OAuthControl();
this.tpGoogleDrive = new System.Windows.Forms.TabPage();
this.cbGoogleDriveDirectLink = new System.Windows.Forms.CheckBox();
this.cbGoogleDriveUseFolder = new System.Windows.Forms.CheckBox();
@ -199,7 +192,6 @@ private void InitializeComponent()
this.chGoogleDriveDescription = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnGoogleDriveRefreshFolders = new System.Windows.Forms.Button();
this.cbGoogleDriveIsPublic = new System.Windows.Forms.CheckBox();
this.oauth2GoogleDrive = new ShareX.UploadersLib.OAuthControl();
this.tpPuush = new System.Windows.Forms.TabPage();
this.pbPuush = new System.Windows.Forms.PictureBox();
this.lblPuushAPIKey = new System.Windows.Forms.Label();
@ -218,7 +210,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 ShareX.UploadersLib.OAuthControl();
this.tpAmazonS3 = new System.Windows.Forms.TabPage();
this.txtAmazonS3CustomDomain = new System.Windows.Forms.TextBox();
this.lblAmazonS3PathPreviewLabel = new System.Windows.Forms.Label();
@ -279,7 +270,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 ShareX.UploadersLib.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();
@ -317,7 +307,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 ShareX.UploadersLib.OAuthControl();
this.tpLambda = new System.Windows.Forms.TabPage();
this.lblLambdaInfo = new System.Windows.Forms.Label();
this.lblLambdaApiKey = new System.Windows.Forms.Label();
@ -400,7 +389,6 @@ 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.ucLocalhostAccounts = new ShareX.UploadersLib.AccountsControl();
this.tpEmail = new System.Windows.Forms.TabPage();
this.txtEmailAutomaticSendTo = new System.Windows.Forms.TextBox();
this.cbEmailAutomaticSend = new System.Windows.Forms.CheckBox();
@ -443,8 +431,6 @@ private void InitializeComponent()
this.tpGist = new System.Windows.Forms.TabPage();
this.cbGistUseRawURL = new System.Windows.Forms.CheckBox();
this.cbGistPublishPublic = new System.Windows.Forms.CheckBox();
this.oAuth2Gist = new ShareX.UploadersLib.OAuthControl();
this.atcGistAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.tpUpaste = new System.Windows.Forms.TabPage();
this.cbUpasteIsPublic = new System.Windows.Forms.CheckBox();
this.lblUpasteUserKey = new System.Windows.Forms.Label();
@ -465,8 +451,6 @@ private void InitializeComponent()
this.cbImgurUseGIFV = new System.Windows.Forms.CheckBox();
this.cbImgurUploadSelectedAlbum = new System.Windows.Forms.CheckBox();
this.cbImgurDirectLink = new System.Windows.Forms.CheckBox();
this.atcImgurAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.oauth2Imgur = new ShareX.UploadersLib.OAuthControl();
this.lvImgurAlbumList = new System.Windows.Forms.ListView();
this.chImgurID = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chImgurTitle = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -484,7 +468,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 ShareX.UploadersLib.AccountTypeControl();
this.btnTinyPicLogin = new System.Windows.Forms.Button();
this.txtTinyPicPassword = new System.Windows.Forms.TextBox();
this.lblTinyPicPassword = new System.Windows.Forms.Label();
@ -525,7 +508,6 @@ private void InitializeComponent()
this.chPicasaName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chPicasaDescription = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnPicasaRefreshAlbumList = new System.Windows.Forms.Button();
this.oauth2Picasa = new ShareX.UploadersLib.OAuthControl();
this.tpChevereto = new System.Windows.Forms.TabPage();
this.btnCheveretoTestAll = new System.Windows.Forms.Button();
this.lblCheveretoUploadURLExample = new System.Windows.Forms.Label();
@ -548,6 +530,25 @@ private void InitializeComponent()
this.tcUploaders = new System.Windows.Forms.TabControl();
this.lblWidthHint = new System.Windows.Forms.Label();
this.ttlvMain = new ShareX.HelpersLib.TabToListView();
this.cbHastebinUseFileExtension = new System.Windows.Forms.CheckBox();
this.atcImgurAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.oauth2Imgur = new ShareX.UploadersLib.OAuthControl();
this.atcTinyPicAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.oauth2Picasa = new ShareX.UploadersLib.OAuthControl();
this.oAuth2Gist = new ShareX.UploadersLib.OAuthControl();
this.atcGistAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.ucFTPAccounts = new ShareX.UploadersLib.AccountsControl();
this.oauth2Dropbox = new ShareX.UploadersLib.OAuthControl();
this.oAuth2OneDrive = new ShareX.UploadersLib.OAuthControl();
this.oauth2GoogleDrive = new ShareX.UploadersLib.OAuthControl();
this.oauth2Box = new ShareX.UploadersLib.OAuthControl();
this.atcSendSpaceAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.oAuthJira = new ShareX.UploadersLib.OAuthControl();
this.oauthTwitter = new ShareX.UploadersLib.OAuthControl();
this.oauth2Bitly = new ShareX.UploadersLib.OAuthControl();
this.oauth2GoogleURLShortener = new ShareX.UploadersLib.OAuthControl();
this.atcGoogleURLShortenerAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.ucLocalhostAccounts = new ShareX.UploadersLib.AccountsControl();
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.tpOtherUploaders.SuspendLayout();
this.tcOtherUploaders.SuspendLayout();
@ -726,15 +727,6 @@ private void InitializeComponent()
this.cbTwitterSkipMessageBox.UseVisualStyleBackColor = true;
this.cbTwitterSkipMessageBox.CheckedChanged += new System.EventHandler(this.cbTwitterSkipMessageBox_CheckedChanged);
//
// oauthTwitter
//
resources.ApplyResources(this.oauthTwitter, "oauthTwitter");
this.oauthTwitter.IsRefreshable = false;
this.oauthTwitter.Name = "oauthTwitter";
this.oauthTwitter.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauthTwitter_OpenButtonClicked);
this.oauthTwitter.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauthTwitter_CompleteButtonClicked);
this.oauthTwitter.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauthTwitter_ClearButtonClicked);
//
// txtTwitterDescription
//
resources.ApplyResources(this.txtTwitterDescription, "txtTwitterDescription");
@ -1420,15 +1412,6 @@ private void InitializeComponent()
resources.ApplyResources(this.lblBitlyDomain, "lblBitlyDomain");
this.lblBitlyDomain.Name = "lblBitlyDomain";
//
// oauth2Bitly
//
this.oauth2Bitly.IsRefreshable = false;
resources.ApplyResources(this.oauth2Bitly, "oauth2Bitly");
this.oauth2Bitly.Name = "oauth2Bitly";
this.oauth2Bitly.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked);
this.oauth2Bitly.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked);
this.oauth2Bitly.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Bitly_ClearButtonClicked);
//
// tpGoogleURLShortener
//
this.tpGoogleURLShortener.Controls.Add(this.oauth2GoogleURLShortener);
@ -1437,22 +1420,6 @@ private void InitializeComponent()
this.tpGoogleURLShortener.Name = "tpGoogleURLShortener";
this.tpGoogleURLShortener.UseVisualStyleBackColor = true;
//
// oauth2GoogleURLShortener
//
resources.ApplyResources(this.oauth2GoogleURLShortener, "oauth2GoogleURLShortener");
this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener";
this.oauth2GoogleURLShortener.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked);
this.oauth2GoogleURLShortener.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2GoogleURLShortener_ClearButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
//
// atcGoogleURLShortenerAccountType
//
resources.ApplyResources(this.atcGoogleURLShortenerAccountType, "atcGoogleURLShortenerAccountType");
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
//
// tpYourls
//
this.tpYourls.Controls.Add(this.txtYourlsPassword);
@ -1720,11 +1687,6 @@ private void InitializeComponent()
this.cboFtpText.Name = "cboFtpText";
this.cboFtpText.SelectedIndexChanged += new System.EventHandler(this.cboFtpText_SelectedIndexChanged);
//
// ucFTPAccounts
//
resources.ApplyResources(this.ucFTPAccounts, "ucFTPAccounts");
this.ucFTPAccounts.Name = "ucFTPAccounts";
//
// tpDropbox
//
this.tpDropbox.Controls.Add(this.oauth2Dropbox);
@ -1739,15 +1701,6 @@ private void InitializeComponent()
this.tpDropbox.Name = "tpDropbox";
this.tpDropbox.UseVisualStyleBackColor = true;
//
// oauth2Dropbox
//
this.oauth2Dropbox.IsRefreshable = false;
resources.ApplyResources(this.oauth2Dropbox, "oauth2Dropbox");
this.oauth2Dropbox.Name = "oauth2Dropbox";
this.oauth2Dropbox.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Dropbox_OpenButtonClicked);
this.oauth2Dropbox.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Dropbox_CompleteButtonClicked);
this.oauth2Dropbox.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Dropbox_ClearButtonClicked);
//
// cbDropboxURLType
//
this.cbDropboxURLType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -1821,15 +1774,6 @@ private void InitializeComponent()
this.cbOneDriveCreateShareableLink.UseVisualStyleBackColor = true;
this.cbOneDriveCreateShareableLink.CheckedChanged += new System.EventHandler(this.cbOneDriveCreateShareableLink_CheckedChanged);
//
// oAuth2OneDrive
//
resources.ApplyResources(this.oAuth2OneDrive, "oAuth2OneDrive");
this.oAuth2OneDrive.Name = "oAuth2OneDrive";
this.oAuth2OneDrive.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuth2OneDrive_OpenButtonClicked);
this.oAuth2OneDrive.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuth2OneDrive_CompleteButtonClicked);
this.oAuth2OneDrive.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuth2OneDrive_ClearButtonClicked);
this.oAuth2OneDrive.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oAuth2OneDrive_RefreshButtonClicked);
//
// tpGoogleDrive
//
this.tpGoogleDrive.Controls.Add(this.cbGoogleDriveDirectLink);
@ -1905,15 +1849,6 @@ private void InitializeComponent()
this.cbGoogleDriveIsPublic.UseVisualStyleBackColor = true;
this.cbGoogleDriveIsPublic.CheckedChanged += new System.EventHandler(this.cbGoogleDriveIsPublic_CheckedChanged);
//
// oauth2GoogleDrive
//
resources.ApplyResources(this.oauth2GoogleDrive, "oauth2GoogleDrive");
this.oauth2GoogleDrive.Name = "oauth2GoogleDrive";
this.oauth2GoogleDrive.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked);
this.oauth2GoogleDrive.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked);
this.oauth2GoogleDrive.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2GoogleDrive_ClearButtonClicked);
this.oauth2GoogleDrive.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked);
//
// tpPuush
//
this.tpPuush.Controls.Add(this.pbPuush);
@ -2046,15 +1981,6 @@ private void InitializeComponent()
this.btnBoxRefreshFolders.UseVisualStyleBackColor = true;
this.btnBoxRefreshFolders.Click += new System.EventHandler(this.btnBoxRefreshFolders_Click);
//
// oauth2Box
//
resources.ApplyResources(this.oauth2Box, "oauth2Box");
this.oauth2Box.Name = "oauth2Box";
this.oauth2Box.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Box_OpenButtonClicked);
this.oauth2Box.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Box_CompleteButtonClicked);
this.oauth2Box.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Box_ClearButtonClicked);
this.oauth2Box.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2Box_RefreshButtonClicked);
//
// tpAmazonS3
//
this.tpAmazonS3.Controls.Add(this.txtAmazonS3CustomDomain);
@ -2472,13 +2398,6 @@ private void InitializeComponent()
this.txtSendSpaceUserName.Name = "txtSendSpaceUserName";
this.txtSendSpaceUserName.TextChanged += new System.EventHandler(this.txtSendSpaceUserName_TextChanged);
//
// atcSendSpaceAccountType
//
resources.ApplyResources(this.atcSendSpaceAccountType, "atcSendSpaceAccountType");
this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType";
this.atcSendSpaceAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcSendSpaceAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged);
//
// tpGe_tt
//
this.tpGe_tt.Controls.Add(this.lblGe_ttStatus);
@ -2734,15 +2653,6 @@ private void InitializeComponent()
resources.ApplyResources(this.lblJiraHost, "lblJiraHost");
this.lblJiraHost.Name = "lblJiraHost";
//
// oAuthJira
//
resources.ApplyResources(this.oAuthJira, "oAuthJira");
this.oAuthJira.Name = "oAuthJira";
this.oAuthJira.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked);
this.oAuthJira.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked);
this.oAuthJira.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuthJira_ClearButtonClicked);
this.oAuthJira.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// tpLambda
//
this.tpLambda.Controls.Add(this.lblLambdaInfo);
@ -3328,11 +3238,6 @@ private void InitializeComponent()
this.cboSharedFolderImages.Name = "cboSharedFolderImages";
this.cboSharedFolderImages.SelectedIndexChanged += new System.EventHandler(this.cboSharedFolderImages_SelectedIndexChanged);
//
// ucLocalhostAccounts
//
resources.ApplyResources(this.ucLocalhostAccounts, "ucLocalhostAccounts");
this.ucLocalhostAccounts.Name = "ucLocalhostAccounts";
//
// tpEmail
//
this.tpEmail.Controls.Add(this.txtEmailAutomaticSendTo);
@ -3640,22 +3545,6 @@ private void InitializeComponent()
this.cbGistPublishPublic.UseVisualStyleBackColor = true;
this.cbGistPublishPublic.CheckedChanged += new System.EventHandler(this.chkGistPublishPublic_CheckedChanged);
//
// oAuth2Gist
//
resources.ApplyResources(this.oAuth2Gist, "oAuth2Gist");
this.oAuth2Gist.IsRefreshable = false;
this.oAuth2Gist.Name = "oAuth2Gist";
this.oAuth2Gist.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked);
this.oAuth2Gist.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked);
this.oAuth2Gist.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuth2Gist_ClearButtonClicked);
//
// atcGistAccountType
//
resources.ApplyResources(this.atcGistAccountType, "atcGistAccountType");
this.atcGistAccountType.Name = "atcGistAccountType";
this.atcGistAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcGistAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged);
//
// tpUpaste
//
this.tpUpaste.Controls.Add(this.cbUpasteIsPublic);
@ -3686,6 +3575,7 @@ private void InitializeComponent()
//
// tpHastebin
//
this.tpHastebin.Controls.Add(this.cbHastebinUseFileExtension);
this.tpHastebin.Controls.Add(this.txtHastebinSyntaxHighlighting);
this.tpHastebin.Controls.Add(this.txtHastebinCustomDomain);
this.tpHastebin.Controls.Add(this.lblHastebinSyntaxHighlighting);
@ -3807,22 +3697,6 @@ private void InitializeComponent()
this.cbImgurDirectLink.UseVisualStyleBackColor = true;
this.cbImgurDirectLink.CheckedChanged += new System.EventHandler(this.cbImgurDirectLink_CheckedChanged);
//
// atcImgurAccountType
//
resources.ApplyResources(this.atcImgurAccountType, "atcImgurAccountType");
this.atcImgurAccountType.Name = "atcImgurAccountType";
this.atcImgurAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcImgurAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged);
//
// oauth2Imgur
//
resources.ApplyResources(this.oauth2Imgur, "oauth2Imgur");
this.oauth2Imgur.Name = "oauth2Imgur";
this.oauth2Imgur.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked);
this.oauth2Imgur.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked);
this.oauth2Imgur.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Imgur_ClearButtonClicked);
this.oauth2Imgur.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked);
//
// lvImgurAlbumList
//
this.lvImgurAlbumList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -3949,13 +3823,6 @@ private void InitializeComponent()
this.tpTinyPic.Name = "tpTinyPic";
this.tpTinyPic.UseVisualStyleBackColor = true;
//
// atcTinyPicAccountType
//
resources.ApplyResources(this.atcTinyPicAccountType, "atcTinyPicAccountType");
this.atcTinyPicAccountType.Name = "atcTinyPicAccountType";
this.atcTinyPicAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcTinyPicAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged);
//
// btnTinyPicLogin
//
resources.ApplyResources(this.btnTinyPicLogin, "btnTinyPicLogin");
@ -4236,15 +4103,6 @@ private void InitializeComponent()
this.btnPicasaRefreshAlbumList.UseVisualStyleBackColor = true;
this.btnPicasaRefreshAlbumList.Click += new System.EventHandler(this.btnPicasaRefreshAlbumList_Click);
//
// oauth2Picasa
//
resources.ApplyResources(this.oauth2Picasa, "oauth2Picasa");
this.oauth2Picasa.Name = "oauth2Picasa";
this.oauth2Picasa.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked);
this.oauth2Picasa.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked);
this.oauth2Picasa.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Picasa_ClearButtonClicked);
this.oauth2Picasa.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked);
//
// tpChevereto
//
this.tpChevereto.Controls.Add(this.btnCheveretoTestAll);
@ -4401,6 +4259,157 @@ private void InitializeComponent()
this.ttlvMain.MainTabControl = null;
this.ttlvMain.Name = "ttlvMain";
//
// cbHastebinUseFileExtension
//
resources.ApplyResources(this.cbHastebinUseFileExtension, "cbHastebinUseFileExtension");
this.cbHastebinUseFileExtension.Name = "cbHastebinUseFileExtension";
this.cbHastebinUseFileExtension.UseVisualStyleBackColor = true;
this.cbHastebinUseFileExtension.CheckedChanged += new System.EventHandler(this.cbHastebinUseFileExtension_CheckedChanged);
//
// atcImgurAccountType
//
resources.ApplyResources(this.atcImgurAccountType, "atcImgurAccountType");
this.atcImgurAccountType.Name = "atcImgurAccountType";
this.atcImgurAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcImgurAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged);
//
// oauth2Imgur
//
resources.ApplyResources(this.oauth2Imgur, "oauth2Imgur");
this.oauth2Imgur.Name = "oauth2Imgur";
this.oauth2Imgur.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked);
this.oauth2Imgur.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked);
this.oauth2Imgur.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Imgur_ClearButtonClicked);
this.oauth2Imgur.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked);
//
// atcTinyPicAccountType
//
resources.ApplyResources(this.atcTinyPicAccountType, "atcTinyPicAccountType");
this.atcTinyPicAccountType.Name = "atcTinyPicAccountType";
this.atcTinyPicAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcTinyPicAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged);
//
// oauth2Picasa
//
resources.ApplyResources(this.oauth2Picasa, "oauth2Picasa");
this.oauth2Picasa.Name = "oauth2Picasa";
this.oauth2Picasa.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked);
this.oauth2Picasa.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked);
this.oauth2Picasa.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Picasa_ClearButtonClicked);
this.oauth2Picasa.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked);
//
// oAuth2Gist
//
resources.ApplyResources(this.oAuth2Gist, "oAuth2Gist");
this.oAuth2Gist.IsRefreshable = false;
this.oAuth2Gist.Name = "oAuth2Gist";
this.oAuth2Gist.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked);
this.oAuth2Gist.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked);
this.oAuth2Gist.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuth2Gist_ClearButtonClicked);
//
// atcGistAccountType
//
resources.ApplyResources(this.atcGistAccountType, "atcGistAccountType");
this.atcGistAccountType.Name = "atcGistAccountType";
this.atcGistAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcGistAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged);
//
// ucFTPAccounts
//
resources.ApplyResources(this.ucFTPAccounts, "ucFTPAccounts");
this.ucFTPAccounts.Name = "ucFTPAccounts";
//
// oauth2Dropbox
//
this.oauth2Dropbox.IsRefreshable = false;
resources.ApplyResources(this.oauth2Dropbox, "oauth2Dropbox");
this.oauth2Dropbox.Name = "oauth2Dropbox";
this.oauth2Dropbox.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Dropbox_OpenButtonClicked);
this.oauth2Dropbox.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Dropbox_CompleteButtonClicked);
this.oauth2Dropbox.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Dropbox_ClearButtonClicked);
//
// oAuth2OneDrive
//
resources.ApplyResources(this.oAuth2OneDrive, "oAuth2OneDrive");
this.oAuth2OneDrive.Name = "oAuth2OneDrive";
this.oAuth2OneDrive.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuth2OneDrive_OpenButtonClicked);
this.oAuth2OneDrive.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuth2OneDrive_CompleteButtonClicked);
this.oAuth2OneDrive.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuth2OneDrive_ClearButtonClicked);
this.oAuth2OneDrive.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oAuth2OneDrive_RefreshButtonClicked);
//
// oauth2GoogleDrive
//
resources.ApplyResources(this.oauth2GoogleDrive, "oauth2GoogleDrive");
this.oauth2GoogleDrive.Name = "oauth2GoogleDrive";
this.oauth2GoogleDrive.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked);
this.oauth2GoogleDrive.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked);
this.oauth2GoogleDrive.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2GoogleDrive_ClearButtonClicked);
this.oauth2GoogleDrive.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked);
//
// oauth2Box
//
resources.ApplyResources(this.oauth2Box, "oauth2Box");
this.oauth2Box.Name = "oauth2Box";
this.oauth2Box.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Box_OpenButtonClicked);
this.oauth2Box.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Box_CompleteButtonClicked);
this.oauth2Box.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Box_ClearButtonClicked);
this.oauth2Box.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2Box_RefreshButtonClicked);
//
// atcSendSpaceAccountType
//
resources.ApplyResources(this.atcSendSpaceAccountType, "atcSendSpaceAccountType");
this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType";
this.atcSendSpaceAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcSendSpaceAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged);
//
// oAuthJira
//
resources.ApplyResources(this.oAuthJira, "oAuthJira");
this.oAuthJira.Name = "oAuthJira";
this.oAuthJira.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked);
this.oAuthJira.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked);
this.oAuthJira.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuthJira_ClearButtonClicked);
this.oAuthJira.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// oauthTwitter
//
resources.ApplyResources(this.oauthTwitter, "oauthTwitter");
this.oauthTwitter.IsRefreshable = false;
this.oauthTwitter.Name = "oauthTwitter";
this.oauthTwitter.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauthTwitter_OpenButtonClicked);
this.oauthTwitter.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauthTwitter_CompleteButtonClicked);
this.oauthTwitter.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauthTwitter_ClearButtonClicked);
//
// oauth2Bitly
//
this.oauth2Bitly.IsRefreshable = false;
resources.ApplyResources(this.oauth2Bitly, "oauth2Bitly");
this.oauth2Bitly.Name = "oauth2Bitly";
this.oauth2Bitly.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked);
this.oauth2Bitly.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked);
this.oauth2Bitly.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2Bitly_ClearButtonClicked);
//
// oauth2GoogleURLShortener
//
resources.ApplyResources(this.oauth2GoogleURLShortener, "oauth2GoogleURLShortener");
this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener";
this.oauth2GoogleURLShortener.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked);
this.oauth2GoogleURLShortener.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2GoogleURLShortener_ClearButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
//
// atcGoogleURLShortenerAccountType
//
resources.ApplyResources(this.atcGoogleURLShortenerAccountType, "atcGoogleURLShortenerAccountType");
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
//
// ucLocalhostAccounts
//
resources.ApplyResources(this.ucLocalhostAccounts, "ucLocalhostAccounts");
this.ucLocalhostAccounts.Name = "ucLocalhostAccounts";
//
// actRapidShareAccountType
//
resources.ApplyResources(this.actRapidShareAccountType, "actRapidShareAccountType");
@ -5084,5 +5093,6 @@ private void InitializeComponent()
private System.Windows.Forms.Label lblPuushPassword;
public System.Windows.Forms.TabPage tpPuush;
private System.Windows.Forms.PictureBox pbPuush;
private System.Windows.Forms.CheckBox cbHastebinUseFileExtension;
}
}

View file

@ -306,6 +306,7 @@ public void LoadSettings()
txtHastebinCustomDomain.Text = Config.HastebinCustomDomain;
txtHastebinSyntaxHighlighting.Text = Config.HastebinSyntaxHighlighting;
cbHastebinUseFileExtension.Checked = Config.HastebinUseFileExtension;
// OneTimeSecret
@ -1201,6 +1202,11 @@ private void txtHastebinSyntaxHighlighting_TextChanged(object sender, EventArgs
Config.HastebinSyntaxHighlighting = txtHastebinSyntaxHighlighting.Text;
}
private void cbHastebinUseFileExtension_CheckedChanged(object sender, EventArgs e)
{
Config.HastebinUseFileExtension = cbHastebinUseFileExtension.Checked;
}
#endregion Hastebin
#region OneTimeSecret

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,7 @@
using Newtonsoft.Json;
using ShareX.HelpersLib;
using ShareX.UploadersLib.Properties;
using System;
using System.Drawing;
using System.Windows.Forms;
@ -44,7 +45,8 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
return new Hastebin()
{
CustomDomain = config.HastebinCustomDomain,
SyntaxHighlighting = config.HastebinSyntaxHighlighting
SyntaxHighlighting = config.HastebinSyntaxHighlighting,
UseFileExtension = config.HastebinUseFileExtension
};
}
@ -55,6 +57,7 @@ public sealed class Hastebin : TextUploader
{
public string CustomDomain { get; set; }
public string SyntaxHighlighting { get; set; }
public bool UseFileExtension { get; set; }
public override UploadResult UploadText(string text, string fileName)
{
@ -83,9 +86,21 @@ public override UploadResult UploadText(string text, string fileName)
{
string url = URLHelpers.CombineURL(domain, response.Key);
if (!string.IsNullOrEmpty(SyntaxHighlighting))
string syntaxHighlighting = SyntaxHighlighting;
if (UseFileExtension)
{
url += "." + SyntaxHighlighting;
string ext = Helpers.GetFilenameExtension(fileName);
if (!string.IsNullOrEmpty(ext) && !ext.Equals("txt", StringComparison.InvariantCultureIgnoreCase))
{
syntaxHighlighting = ext;
}
}
if (!string.IsNullOrEmpty(syntaxHighlighting))
{
url += "." + syntaxHighlighting;
}
ur.URL = url;

View file

@ -117,6 +117,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public string HastebinCustomDomain = "http://hastebin.com";
public string HastebinSyntaxHighlighting = "hs";
public bool HastebinUseFileExtension = true;
// OneTimeSecret