From af2b7879189c9b6e15c6cbb4cde05135c83625de Mon Sep 17 00:00:00 2001 From: Caleb Blankemeyer Date: Mon, 12 Oct 2015 23:54:19 -0400 Subject: [PATCH] ShareX/WorkerTask.cs added Seafile task - ShareX.UploadersLib/UploadersConfig.cs added Seafile configuration properties - ShareX.UploadersLib/Forms/UploadersConfigForm.resx ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs ShareX.UploadersLib/Forms/UploadersConfigForm.cs added Seafile tab, settings, and relevant configuration & validation utilities - ShareX.UploadersLib/FileUploaders/Seafile.cs main Seafile controller class, watch out for the ShareURL class as it doesn't used shared http classes due to contentlength and postdata PUT constraints --- ShareX.UploadersLib/FileUploaders/Seafile.cs | 108 +- .../Forms/UploadersConfigForm.Designer.cs | 456 ++++--- .../Forms/UploadersConfigForm.cs | 25 +- .../Forms/UploadersConfigForm.resx | 1067 +++++++++-------- ShareX.UploadersLib/UploadersConfig.cs | 2 + ShareX/WorkerTask.cs | 2 + 6 files changed, 951 insertions(+), 709 deletions(-) diff --git a/ShareX.UploadersLib/FileUploaders/Seafile.cs b/ShareX.UploadersLib/FileUploaders/Seafile.cs index 4e0ad081a..8a66b4dd3 100644 --- a/ShareX.UploadersLib/FileUploaders/Seafile.cs +++ b/ShareX.UploadersLib/FileUploaders/Seafile.cs @@ -31,8 +31,8 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.IO; -using System.Linq; using System.Net; +using System.Net.Cache; using System.Text; namespace ShareX.UploadersLib.FileUploaders @@ -45,9 +45,11 @@ public sealed class Seafile : FileUploader public string Path { get; set; } public bool IsLibraryEncrypted { get; set; } public string EncryptedLibraryPassword { get; set; } + public int ShareDaysToExpire { get; set; } + public string SharePassword { get; set; } public bool CreateShareableURL { get; set; } public bool IgnoreInvalidCert { get; set; } - + public Seafile(string apiurl, string authtoken, string repoid) { APIURL = apiurl; @@ -140,7 +142,7 @@ public bool CheckAuthToken() { sslBypassHelper = new SSLBypassHelper(); } - + string response = SendRequest(HttpMethod.GET, url, null, headers); if (!string.IsNullOrEmpty(response)) @@ -162,7 +164,7 @@ public bool CheckAuthToken() } } - #endregion + #endregion SeafileChecks #region SeafileAccountInformation @@ -210,7 +212,7 @@ public class SeafileCheckAccInfoResponse public string email { get; set; } } - #endregion + #endregion SeafileAccountInformation #region SeafileLibraries @@ -220,7 +222,7 @@ public string GetOrMakeDefaultLibrary(string authtoken = null) url = URLHelpers.CombineURL(APIURL, "default-repo/?format=json"); NameValueCollection headers = new NameValueCollection(); - headers.Add("Authorization", "Token " + (authtoken==null?AuthToken: authtoken)); + headers.Add("Authorization", "Token " + (authtoken == null ? AuthToken : authtoken)); SSLBypassHelper sslBypassHelper = null; @@ -236,7 +238,7 @@ public string GetOrMakeDefaultLibrary(string authtoken = null) if (!string.IsNullOrEmpty(response)) { SeafileDefaultLibraryObj JsonResponse = JsonConvert.DeserializeObject(response); - + return JsonResponse.repo_id; } @@ -298,7 +300,7 @@ public bool ValidatePath(string path) { string url = URLHelpers.FixPrefix(APIURL); url = URLHelpers.CombineURL(APIURL, "repos/" + RepoID + "/dir/?p=" + path + "&format=json"); - + NameValueCollection headers = new NameValueCollection(); headers.Add("Authorization", "Token " + AuthToken); @@ -315,8 +317,6 @@ public bool ValidatePath(string path) if (!string.IsNullOrEmpty(response)) { - //List JsonResponse = JsonConvert.DeserializeObject>(response); - DebugHelper.WriteLine(response); return true; } @@ -347,7 +347,7 @@ public class SeafileLibraryObj public string root { get; set; } } - #endregion + #endregion SeafileLibraries #region SeafileEncryptedLibrary @@ -375,7 +375,7 @@ public bool DecryptLibrary(string libraryPassword) if (!string.IsNullOrEmpty(response)) { - if (response=="\"success\"") + if (response == "\"success\"") { return true; } @@ -396,7 +396,7 @@ public bool DecryptLibrary(string libraryPassword) } } - #endregion + #endregion SeafileEncryptedLibrary #region SeafileUpload @@ -419,7 +419,7 @@ public override UploadResult Upload(Stream stream, string fileName) else { char pathLast = Path[Path.Length - 1]; - if (pathLast!='/') + if (pathLast != '/') { Path += "/"; } @@ -443,7 +443,7 @@ public override UploadResult Upload(Stream stream, string fileName) string response = SendRequest(HttpMethod.GET, url, null, headers); string responseURL = response.Trim('"'); - + Dictionary args = new Dictionary(); args.Add("filename", fileName); args.Add("parent_dir", Path); @@ -452,10 +452,10 @@ public override UploadResult Upload(Stream stream, string fileName) if (!IsError) { - if (CreateShareableURL) + if (CreateShareableURL && !IsLibraryEncrypted) { AllowReportProgress = false; - result.URL = ShareFile(Path+fileName, result.Response.Trim('"')); + result.URL = ShareFile(Path + fileName, result.Response.Trim('"')); } else { @@ -480,10 +480,10 @@ public string ShareFile(string path, string id = null) url = URLHelpers.CombineURL(APIURL, "repos/" + RepoID + "/file/shared-link/"); Dictionary args = new Dictionary(); - if (IsLibraryEncrypted) args.Add("password", EncryptedLibraryPassword); + if (!String.IsNullOrEmpty(SharePassword)) args.Add("password", SharePassword); args.Add("p", path); args.Add("format", "json"); - args.Add("expire", "7"); + args.Add("expire", ShareDaysToExpire.ToString()); NameValueCollection headers = new NameValueCollection(); headers.Add("Authorization", "Token " + AuthToken); @@ -498,35 +498,71 @@ public string ShareFile(string path, string id = null) } //had to do this to get the ContentLength header to use for the PUT request + string boundary = new string('-', 20) + DateTime.Now.Ticks.ToString("x"); + byte[] POSTDATA; + using (MemoryStream stream = new MemoryStream()) + { + byte[] bytes; + + if (args != null) + { + foreach (KeyValuePair content in args) + { + if (!string.IsNullOrEmpty(content.Key) && !string.IsNullOrEmpty(content.Value)) + { + string format = string.Format("--{0}\r\nContent-Disposition: form-data; name=\"{1}\"\r\n\r\n{2}\r\n", boundary, content.Key, content.Value); + bytes = Encoding.UTF8.GetBytes(format); + stream.Write(bytes, 0, bytes.Length); + } + } + + bytes = Encoding.UTF8.GetBytes(string.Format("--{0}--\r\n", boundary)); + stream.Write(bytes, 0, bytes.Length); + } + + POSTDATA = stream.ToArray(); + } + MemoryStream dataStream = new MemoryStream(); + dataStream.Write(POSTDATA, 0, POSTDATA.Length); + HttpWebResponse response = null; - url = url + "?" + string.Join("&", args.Select(x => x.Key + "=" + x.Value).ToArray()); - DebugHelper.WriteLine(url); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); - request.ContentLength = 0; + request.ContentLength = POSTDATA.Length; + request.Accept = "application/json"; request.Method = "PUT"; request.Headers.Add(headers); - IWebProxy proxy = HelpersOptions.CurrentProxy.GetWebProxy(); - if (proxy != null) request.Proxy = proxy; - request.UserAgent = "ShareX"; - - response = (HttpWebResponse)request.GetResponse(); - string textResponse; - using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8)) + request.UserAgent = "ShareX"; + string contentType = "multipart/form-data"; + request.AllowWriteStreamBuffering = HelpersOptions.CurrentProxy.IsValidProxy(); + request.CachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); + request.ContentLength = dataStream.Length; + if (!string.IsNullOrEmpty(boundary)) contentType += "; boundary=" + boundary; + request.ContentType = contentType; + request.CookieContainer = new CookieContainer(); + request.KeepAlive = true; + request.Pipelined = false; + request.ProtocolVersion = HttpVersion.Version11; + request.Proxy = HelpersOptions.CurrentProxy.GetWebProxy(); + request.Timeout = -1; + + using (Stream requestStream = request.GetRequestStream()) { - textResponse = reader.ReadToEnd(); + if (!TransferData(dataStream, requestStream)) + { + } } - DebugHelper.WriteLine(textResponse); + response = (HttpWebResponse)request.GetResponse(); + + string Location = response.Headers["Location"]; response.Close(); + dataStream.Close(); - //string response = SendRequest(HttpMethod.PUT, url, args, headers); - - if (!string.IsNullOrEmpty(textResponse)) + if (!string.IsNullOrEmpty(Location)) { - DebugHelper.WriteLine(textResponse); - return null; + return Location; } return null; diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs index 43889767c..fa36b1806 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs @@ -42,6 +42,7 @@ 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(); @@ -109,7 +110,10 @@ 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(); @@ -145,7 +149,9 @@ 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.btnDropboxShowFiles = new System.Windows.Forms.Button(); @@ -158,6 +164,7 @@ 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.cbGoogleDriveUseFolder = new System.Windows.Forms.CheckBox(); this.txtGoogleDriveFolderID = new System.Windows.Forms.TextBox(); @@ -167,6 +174,7 @@ 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.tpBox = new System.Windows.Forms.TabPage(); this.lblBoxFolderTip = new System.Windows.Forms.Label(); this.cbBoxShare = new System.Windows.Forms.CheckBox(); @@ -174,6 +182,7 @@ 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.tpCopy = new System.Windows.Forms.TabPage(); this.pbCopyLogo = new System.Windows.Forms.PictureBox(); this.lblCopyURLType = new System.Windows.Forms.Label(); @@ -181,6 +190,7 @@ private void InitializeComponent() this.lblCopyStatus = new System.Windows.Forms.Label(); this.lblCopyPath = new System.Windows.Forms.Label(); this.txtCopyPath = new System.Windows.Forms.TextBox(); + this.oAuthCopy = 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(); @@ -242,6 +252,7 @@ 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(); @@ -279,6 +290,7 @@ 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(); @@ -296,8 +308,13 @@ private void InitializeComponent() this.lblUp1Key = new System.Windows.Forms.Label(); this.lblUp1Host = new System.Windows.Forms.Label(); this.tpSeafile = new System.Windows.Forms.TabPage(); + this.btnSeafileLibraryPasswordValidate = new System.Windows.Forms.Button(); + this.txtSeafileLibraryPassword = new System.Windows.Forms.TextBox(); + this.lblSeafileLibraryPassword = new System.Windows.Forms.Label(); this.lvSeafileLibraries = new ShareX.HelpersLib.MyListView(); this.colSeafileLibraryName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.colSeafileLibrarySize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.colSeafileLibraryEncrypted = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.btnSeafilePathValidate = new System.Windows.Forms.Button(); this.txtSeafileDirectoryPath = new System.Windows.Forms.TextBox(); this.lblSeafileWritePermNotif = new System.Windows.Forms.Label(); @@ -348,6 +365,7 @@ 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.btnCopyShowFiles = new System.Windows.Forms.Button(); this.tpTextUploaders = new System.Windows.Forms.TabPage(); this.tcTextUploaders = new System.Windows.Forms.TabControl(); @@ -372,6 +390,8 @@ 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 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(); @@ -392,6 +412,8 @@ 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())); @@ -409,6 +431,7 @@ 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(); @@ -449,6 +472,7 @@ 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.cbCheveretoDirectURL = new System.Windows.Forms.CheckBox(); this.lblCheveretoWebsiteTip = new System.Windows.Forms.Label(); @@ -459,31 +483,12 @@ private void InitializeComponent() this.tcUploaders = new System.Windows.Forms.TabControl(); this.lblWidthHint = new System.Windows.Forms.Label(); this.ttlvMain = new ShareX.HelpersLib.TabToListView(); - this.colSeafileLibrarySize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - 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.oAuthCopy = 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.colSeafileLibraryEncrypted = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.btnSeafileLibraryPasswordValidate = new System.Windows.Forms.Button(); - this.txtSeafileLibraryPassword = new System.Windows.Forms.TextBox(); - this.lblSeafileLibraryPassword = new System.Windows.Forms.Label(); + this.grpSeafileShareSettings = new System.Windows.Forms.GroupBox(); + this.lblSeafileDaysToExpire = new System.Windows.Forms.Label(); + this.nudSeafileExpireDays = new System.Windows.Forms.NumericUpDown(); + this.txtSeafileSharePassword = new System.Windows.Forms.TextBox(); + this.lblSeafileSharePassword = new System.Windows.Forms.Label(); this.tpOtherUploaders.SuspendLayout(); this.tcOtherUploaders.SuspendLayout(); this.tpTwitter.SuspendLayout(); @@ -552,6 +557,8 @@ private void InitializeComponent() this.tpPicasa.SuspendLayout(); this.tpChevereto.SuspendLayout(); this.tcUploaders.SuspendLayout(); + this.grpSeafileShareSettings.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudSeafileExpireDays)).BeginInit(); this.SuspendLayout(); // // txtRapidSharePremiumUserName @@ -649,6 +656,15 @@ 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"); @@ -1145,6 +1161,15 @@ 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); @@ -1153,6 +1178,22 @@ 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); @@ -1417,6 +1458,11 @@ 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); @@ -1432,6 +1478,15 @@ 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; @@ -1512,6 +1567,15 @@ 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.cbGoogleDriveUseFolder); @@ -1579,6 +1643,15 @@ 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); + // // tpBox // this.tpBox.Controls.Add(this.lblBoxFolderTip); @@ -1632,6 +1705,15 @@ 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); + // // tpCopy // this.tpCopy.Controls.Add(this.pbCopyLogo); @@ -1682,6 +1764,15 @@ private void InitializeComponent() this.txtCopyPath.Name = "txtCopyPath"; this.txtCopyPath.TextChanged += new System.EventHandler(this.txtCopyPath_TextChanged); // + // oAuthCopy + // + this.oAuthCopy.IsRefreshable = false; + resources.ApplyResources(this.oAuthCopy, "oAuthCopy"); + this.oAuthCopy.Name = "oAuthCopy"; + this.oAuthCopy.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuthCopy_OpenButtonClicked); + this.oAuthCopy.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuthCopy_CompleteButtonClicked); + this.oAuthCopy.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuthCopy_ClearButtonClicked); + // // tpAmazonS3 // this.tpAmazonS3.Controls.Add(this.txtAmazonS3CustomDomain); @@ -2106,6 +2197,13 @@ 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); @@ -2361,6 +2459,15 @@ 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); @@ -2469,6 +2576,7 @@ private void InitializeComponent() // // tpSeafile // + this.tpSeafile.Controls.Add(this.grpSeafileShareSettings); this.tpSeafile.Controls.Add(this.btnSeafileLibraryPasswordValidate); this.tpSeafile.Controls.Add(this.txtSeafileLibraryPassword); this.tpSeafile.Controls.Add(this.lblSeafileLibraryPassword); @@ -2493,6 +2601,25 @@ private void InitializeComponent() this.tpSeafile.Name = "tpSeafile"; this.tpSeafile.UseVisualStyleBackColor = true; // + // btnSeafileLibraryPasswordValidate + // + resources.ApplyResources(this.btnSeafileLibraryPasswordValidate, "btnSeafileLibraryPasswordValidate"); + this.btnSeafileLibraryPasswordValidate.Name = "btnSeafileLibraryPasswordValidate"; + this.btnSeafileLibraryPasswordValidate.UseVisualStyleBackColor = true; + this.btnSeafileLibraryPasswordValidate.Click += new System.EventHandler(this.btnSeafileLibraryPasswordValidate_Click); + // + // txtSeafileLibraryPassword + // + resources.ApplyResources(this.txtSeafileLibraryPassword, "txtSeafileLibraryPassword"); + this.txtSeafileLibraryPassword.Name = "txtSeafileLibraryPassword"; + this.txtSeafileLibraryPassword.UseSystemPasswordChar = true; + this.txtSeafileLibraryPassword.TextChanged += new System.EventHandler(this.txtSeafileLibraryPassword_TextChanged); + // + // lblSeafileLibraryPassword + // + resources.ApplyResources(this.lblSeafileLibraryPassword, "lblSeafileLibraryPassword"); + this.lblSeafileLibraryPassword.Name = "lblSeafileLibraryPassword"; + // // lvSeafileLibraries // this.lvSeafileLibraries.AllowColumnSort = true; @@ -2514,6 +2641,14 @@ private void InitializeComponent() // resources.ApplyResources(this.colSeafileLibraryName, "colSeafileLibraryName"); // + // colSeafileLibrarySize + // + resources.ApplyResources(this.colSeafileLibrarySize, "colSeafileLibrarySize"); + // + // colSeafileLibraryEncrypted + // + resources.ApplyResources(this.colSeafileLibraryEncrypted, "colSeafileLibraryEncrypted"); + // // btnSeafilePathValidate // resources.ApplyResources(this.btnSeafilePathValidate, "btnSeafilePathValidate"); @@ -2863,6 +2998,11 @@ 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"; + // // btnCopyShowFiles // resources.ApplyResources(this.btnCopyShowFiles, "btnCopyShowFiles"); @@ -3036,6 +3176,22 @@ private void InitializeComponent() this.chkGistPublishPublic.UseVisualStyleBackColor = true; this.chkGistPublishPublic.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); @@ -3185,6 +3341,22 @@ 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[] { @@ -3311,6 +3483,13 @@ 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"); @@ -3591,6 +3770,15 @@ 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.cbCheveretoDirectURL); @@ -3662,191 +3850,59 @@ private void InitializeComponent() this.ttlvMain.MainTabControl = null; this.ttlvMain.Name = "ttlvMain"; // - // colSeafileLibrarySize - // - resources.ApplyResources(this.colSeafileLibrarySize, "colSeafileLibrarySize"); - // - // 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); - // - // oAuthCopy - // - this.oAuthCopy.IsRefreshable = false; - resources.ApplyResources(this.oAuthCopy, "oAuthCopy"); - this.oAuthCopy.Name = "oAuthCopy"; - this.oAuthCopy.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oAuthCopy_OpenButtonClicked); - this.oAuthCopy.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oAuthCopy_CompleteButtonClicked); - this.oAuthCopy.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuthCopy_ClearButtonClicked); - // - // 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"); this.actRapidShareAccountType.Name = "actRapidShareAccountType"; this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous; // - // colSeafileLibraryEncrypted + // grpSeafileShareSettings // - resources.ApplyResources(this.colSeafileLibraryEncrypted, "colSeafileLibraryEncrypted"); + this.grpSeafileShareSettings.Controls.Add(this.txtSeafileSharePassword); + this.grpSeafileShareSettings.Controls.Add(this.lblSeafileSharePassword); + this.grpSeafileShareSettings.Controls.Add(this.nudSeafileExpireDays); + this.grpSeafileShareSettings.Controls.Add(this.lblSeafileDaysToExpire); + resources.ApplyResources(this.grpSeafileShareSettings, "grpSeafileShareSettings"); + this.grpSeafileShareSettings.Name = "grpSeafileShareSettings"; + this.grpSeafileShareSettings.TabStop = false; // - // btnSeafileLibraryPasswordValidate + // lblSeafileDaysToExpire // - resources.ApplyResources(this.btnSeafileLibraryPasswordValidate, "btnSeafileLibraryPasswordValidate"); - this.btnSeafileLibraryPasswordValidate.Name = "btnSeafileLibraryPasswordValidate"; - this.btnSeafileLibraryPasswordValidate.UseVisualStyleBackColor = true; - this.btnSeafileLibraryPasswordValidate.Click += new System.EventHandler(this.btnSeafileLibraryPasswordValidate_Click); + resources.ApplyResources(this.lblSeafileDaysToExpire, "lblSeafileDaysToExpire"); + this.lblSeafileDaysToExpire.Name = "lblSeafileDaysToExpire"; // - // txtSeafileLibraryPassword + // nudSeafileExpireDays // - resources.ApplyResources(this.txtSeafileLibraryPassword, "txtSeafileLibraryPassword"); - this.txtSeafileLibraryPassword.Name = "txtSeafileLibraryPassword"; - this.txtSeafileLibraryPassword.UseSystemPasswordChar = true; - this.txtSeafileLibraryPassword.TextChanged += new System.EventHandler(this.txtSeafileLibraryPassword_TextChanged); + resources.ApplyResources(this.nudSeafileExpireDays, "nudSeafileExpireDays"); + this.nudSeafileExpireDays.Maximum = new decimal(new int[] { + 900, + 0, + 0, + 0}); + this.nudSeafileExpireDays.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudSeafileExpireDays.Name = "nudSeafileExpireDays"; + this.nudSeafileExpireDays.Value = new decimal(new int[] { + 7, + 0, + 0, + 0}); + this.nudSeafileExpireDays.ValueChanged += new System.EventHandler(this.nudSeafileExpireDays_ValueChanged); // - // lblSeafileLibraryPassword + // txtSeafileSharePassword // - resources.ApplyResources(this.lblSeafileLibraryPassword, "lblSeafileLibraryPassword"); - this.lblSeafileLibraryPassword.Name = "lblSeafileLibraryPassword"; + resources.ApplyResources(this.txtSeafileSharePassword, "txtSeafileSharePassword"); + this.txtSeafileSharePassword.Name = "txtSeafileSharePassword"; + this.txtSeafileSharePassword.UseSystemPasswordChar = true; + this.txtSeafileSharePassword.TextChanged += new System.EventHandler(this.txtSeafileSharePassword_TextChanged); + // + // lblSeafileSharePassword + // + resources.ApplyResources(this.lblSeafileSharePassword, "lblSeafileSharePassword"); + this.lblSeafileSharePassword.Name = "lblSeafileSharePassword"; // // UploadersConfigForm // @@ -3979,6 +4035,9 @@ private void InitializeComponent() this.tpChevereto.ResumeLayout(false); this.tpChevereto.PerformLayout(); this.tcUploaders.ResumeLayout(false); + this.grpSeafileShareSettings.ResumeLayout(false); + this.grpSeafileShareSettings.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudSeafileExpireDays)).EndInit(); this.ResumeLayout(false); } @@ -4439,5 +4498,10 @@ private void InitializeComponent() private System.Windows.Forms.Button btnSeafileLibraryPasswordValidate; private System.Windows.Forms.TextBox txtSeafileLibraryPassword; private System.Windows.Forms.Label lblSeafileLibraryPassword; + private System.Windows.Forms.GroupBox grpSeafileShareSettings; + private System.Windows.Forms.TextBox txtSeafileSharePassword; + private System.Windows.Forms.Label lblSeafileSharePassword; + private System.Windows.Forms.NumericUpDown nudSeafileExpireDays; + private System.Windows.Forms.Label lblSeafileDaysToExpire; } } \ No newline at end of file diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs index 50a2ec220..5ee12b2e6 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs @@ -569,6 +569,8 @@ public void LoadSettings() btnSeafileLibraryPasswordValidate.Enabled = (Config.SeafileIsLibraryEncrypted ? false : true); cbSeafileCreateShareableURL.Checked = Config.SeafileCreateShareableURL; cbSeafileIgnoreInvalidCert.Checked = Config.SeafileIgnoreInvalidCert; + nudSeafileExpireDays.Value = Config.SeafileShareDaysToExpire; + txtSeafileSharePassword.Text = Config.SeafileSharePassword; txtSeafileAccInfoEmail.Text = Config.SeafileAccInfoEmail; txtSeafileAccInfoUsage.Text = Config.SeafileAccInfoUsage; @@ -2109,10 +2111,11 @@ private void btnSeafileCheckAuthToken_Click(object sender, EventArgs e) MessageBox.Show(Resources.UploadersConfigForm_Error, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - + private void txtSeafilePassword_KeyUp(object sender, KeyEventArgs e) { - if (e.KeyCode == Keys.Return) { + if (e.KeyCode == Keys.Return) + { btnSeafileGetAuthToken.PerformClick(); } } @@ -2150,7 +2153,6 @@ private void btnSeafileGetAuthToken_Click(object sender, EventArgs e) DebugHelper.WriteException(ex); MessageBox.Show(ex.ToString(), Resources.UploadersConfigForm_Error, MessageBoxButtons.OK, MessageBoxIcon.Error); } - } } @@ -2190,13 +2192,13 @@ private void txtSeafileUploadLocationRefresh_Click(object sender, EventArgs e) return; } lvSeafileLibraries.Items.Clear(); - + Seafile sf = new Seafile(txtSeafileAPIURL.Text, txtSeafileAuthToken.Text, null); List SeafileLibraries = sf.GetLibraries(); foreach (var SeafileLibrary in SeafileLibraries) { - if (SeafileLibrary.permission=="rw") + if (SeafileLibrary.permission == "rw") { ListViewItem libraryItem = lvSeafileLibraries.Items.Add(SeafileLibrary.name); libraryItem.Name = SeafileLibrary.id; @@ -2206,11 +2208,10 @@ private void txtSeafileUploadLocationRefresh_Click(object sender, EventArgs e) { ListViewItem.ListViewSubItem isEncrypt = libraryItem.SubItems.Add("\u221A"); } - if (SeafileLibrary.id==Config.SeafileRepoID) + if (SeafileLibrary.id == Config.SeafileRepoID) { libraryItem.Selected = true; } - } } } @@ -2293,6 +2294,16 @@ private void btnSeafileLibraryPasswordValidate_Click(object sender, EventArgs e) } } + private void nudSeafileExpireDays_ValueChanged(object sender, EventArgs e) + { + Config.SeafileShareDaysToExpire = (int)nudSeafileExpireDays.Value; + } + + private void txtSeafileSharePassword_TextChanged(object sender, EventArgs e) + { + Config.SeafileSharePassword = txtSeafileSharePassword.Text; + } + #endregion Seafile #endregion File Uploaders diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.resx b/ShareX.UploadersLib/Forms/UploadersConfigForm.resx index 08dcfe44d..3fbf3c024 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.resx +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.resx @@ -574,6 +574,30 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 4 + + False + + + 192, 72 + + + 326, 208 + + + 5 + + + oauthTwitter + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpTwitter + + + 5 + False @@ -2998,6 +3022,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 1 + + 16, 16 + + + 328, 208 + + + 0 + + + oauth2Bitly + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpBitly + + + 2 + oauth2GoogleURLShortener @@ -3049,6 +3094,48 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 1 + + 16, 64 + + + 328, 240 + + + 1 + + + oauth2GoogleURLShortener + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpGoogleURLShortener + + + 0 + + + 16, 16 + + + 214, 40 + + + 0 + + + atcGoogleURLShortenerAccountType + + + ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpGoogleURLShortener + + + 1 + txtYourlsPassword @@ -5977,11 +6064,137 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 18 + + 109, 64 + + + 98, 20 + + + 26 + + + txtSeafileSharePassword + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSeafileShareSettings + + + 0 + + + True + + + NoControl + + + 16, 68 + + + 87, 13 + + + 25 + + + Share Password: + + + lblSeafileSharePassword + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSeafileShareSettings + + + 1 + + + 121, 29 + + + 86, 20 + + + 27 + + + nudSeafileExpireDays + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSeafileShareSettings + + + 2 + + + True + + + NoControl + + + 16, 31 + + + 99, 13 + + + 25 + + + Days To Expiration: + + + lblSeafileDaysToExpire + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSeafileShareSettings + + + 3 + + + 406, 346 + + + 227, 100 + + + 24 + + + Seafile Share Settings + + + grpSeafileShareSettings + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpSeafile + + + 0 + NoControl - 338, 325 + 338, 423 53, 23 @@ -6002,10 +6215,10 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 0 + 1 - 109, 327 + 109, 425 214, 20 @@ -6023,7 +6236,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 1 + 2 True @@ -6032,7 +6245,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ NoControl - 13, 331 + 13, 429 90, 13 @@ -6053,13 +6266,13 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 2 + 3 16, 155 - 375, 106 + 375, 194 16 @@ -6074,13 +6287,13 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 3 + 4 NoControl - 338, 296 + 338, 394 53, 23 @@ -6101,10 +6314,10 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 4 + 5 - 51, 298 + 51, 396 272, 20 @@ -6122,7 +6335,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 5 + 6 True @@ -6131,16 +6344,17 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ NoControl - 13, 272 + 13, 355 - 221, 13 + 221, 26 20 - Libraries without write permissions are hidden. + Libraries without write permissions are hidden. +Using an encrypted library disables sharing. lblSeafileWritePermNotif @@ -6152,7 +6366,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 6 + 7 True @@ -6161,7 +6375,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ NoControl - 13, 302 + 13, 399 32, 13 @@ -6182,13 +6396,13 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 7 + 8 NoControl - 338, 267 + 338, 355 53, 23 @@ -6209,7 +6423,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 8 + 9 True @@ -6239,7 +6453,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 9 + 10 myListView1 @@ -6314,7 +6528,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 5 - 406, 189 + 406, 181 227, 159 @@ -6335,7 +6549,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 10 + 11 NoControl @@ -6362,7 +6576,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 11 + 12 NoControl @@ -6389,7 +6603,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 12 + 13 btnSeafileGetAuthToken @@ -6473,7 +6687,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 13 + 14 True @@ -6503,7 +6717,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 14 + 15 True @@ -6533,7 +6747,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 15 + 16 16, 80 @@ -6554,7 +6768,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 16 + 17 https://seacloud.cc/api2/ @@ -6581,7 +6795,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 17 + 18 True @@ -6611,7 +6825,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 18 + 19 True @@ -6641,7 +6855,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ tpSeafile - 19 + 20 4, 40 @@ -7228,6 +7442,54 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 7 + + Top, Bottom, Left + + + 8, 40 + + + 4, 4, 4, 4 + + + 792, 414 + + + 6 + + + ucFTPAccounts + + + ShareX.UploadersLib.AccountsControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpFTP + + + 8 + + + 16, 88 + + + 328, 200 + + + 1 + + + oauth2Dropbox + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpDropbox + + + 0 + 16, 368 @@ -7647,6 +7909,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 2 + + 16, 16 + + + 328, 240 + + + 2 + + + oAuth2OneDrive + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpOneDrive + + + 3 + True @@ -7821,6 +8104,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 5 + + 16, 16 + + + 328, 240 + + + 0 + + + oauth2GoogleDrive + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpGoogleDrive + + + 6 + True @@ -7968,6 +8272,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 4 + + 16, 16 + + + 328, 240 + + + 0 + + + oauth2Box + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpBox + + + 5 + /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcI @@ -8214,6 +8539,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 5 + + 16, 88 + + + 328, 208 + + + 1 + + + oAuthCopy + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpCopy + + + 6 + 16, 272 @@ -9672,6 +10018,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 4 + + 16, 16 + + + 214, 40 + + + 0 + + + atcSendSpaceAccountType + + + ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpSendSpace + + + 5 + True @@ -10728,6 +11095,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 2 + + 473, 13 + + + 321, 243 + + + 1 + + + oAuthJira + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpJira + + + 3 + True @@ -11082,6 +11470,15 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 237 + + Size + + + 74 + + + Encrypted + -323, -6 @@ -11892,6 +12289,33 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 5 + + Top, Bottom, Left + + + 8, 40 + + + 4, 4, 4, 4 + + + 792, 424 + + + 6 + + + ucLocalhostAccounts + + + ShareX.UploadersLib.AccountsControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpSharedFolder + + + 6 + NoControl @@ -12834,6 +13258,51 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 0 + + False + + + 16, 88 + + + 328, 205 + + + 2 + + + oAuth2Gist + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpGist + + + 1 + + + 16, 16 + + + 214, 40 + + + 0 + + + atcGistAccountType + + + ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpGist + + + 2 + cbUpasteIsPublic @@ -13707,6 +14176,48 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 2 + + 16, 16 + + + 208, 40 + + + 1 + + + atcImgurAccountType + + + ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpImgur + + + 3 + + + 16, 64 + + + 328, 240 + + + 0 + + + oauth2Imgur + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpImgur + + + 4 + 352, 48 @@ -14271,6 +14782,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 2 + + 16, 16 + + + 136, 40 + + + 0 + + + atcTinyPicAccountType + + + ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpTinyPic + + + 0 + NoControl @@ -15594,6 +16126,27 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 3 + + 16, 16 + + + 328, 240 + + + 0 + + + oauth2Picasa + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tpPicasa + + + 4 + cbCheveretoDirectURL @@ -15936,429 +16489,6 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ 2 - - Size - - - 74 - - - 16, 16 - - - 208, 40 - - - 1 - - - atcImgurAccountType - - - ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpImgur - - - 3 - - - 16, 64 - - - 328, 240 - - - 0 - - - oauth2Imgur - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpImgur - - - 4 - - - 16, 16 - - - 136, 40 - - - 0 - - - atcTinyPicAccountType - - - ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpTinyPic - - - 0 - - - 16, 16 - - - 328, 240 - - - 0 - - - oauth2Picasa - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpPicasa - - - 4 - - - False - - - 16, 88 - - - 328, 205 - - - 2 - - - oAuth2Gist - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpGist - - - 1 - - - 16, 16 - - - 214, 40 - - - 0 - - - atcGistAccountType - - - ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpGist - - - 2 - - - Top, Bottom, Left - - - 8, 40 - - - 4, 4, 4, 4 - - - 792, 414 - - - 6 - - - ucFTPAccounts - - - ShareX.UploadersLib.AccountsControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpFTP - - - 8 - - - 16, 88 - - - 328, 200 - - - 1 - - - oauth2Dropbox - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpDropbox - - - 0 - - - 16, 16 - - - 328, 240 - - - 2 - - - oAuth2OneDrive - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpOneDrive - - - 3 - - - 16, 16 - - - 328, 240 - - - 0 - - - oauth2GoogleDrive - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpGoogleDrive - - - 6 - - - 16, 16 - - - 328, 240 - - - 0 - - - oauth2Box - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpBox - - - 5 - - - 16, 88 - - - 328, 208 - - - 1 - - - oAuthCopy - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpCopy - - - 6 - - - 16, 16 - - - 214, 40 - - - 0 - - - atcSendSpaceAccountType - - - ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpSendSpace - - - 5 - - - 473, 13 - - - 321, 243 - - - 1 - - - oAuthJira - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpJira - - - 3 - - - False - - - 192, 72 - - - 326, 208 - - - 5 - - - oauthTwitter - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpTwitter - - - 5 - - - 16, 16 - - - 328, 208 - - - 0 - - - oauth2Bitly - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpBitly - - - 2 - - - 16, 64 - - - 328, 240 - - - 1 - - - oauth2GoogleURLShortener - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpGoogleURLShortener - - - 0 - - - 16, 16 - - - 214, 40 - - - 0 - - - atcGoogleURLShortenerAccountType - - - ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpGoogleURLShortener - - - 1 - - - Top, Bottom, Left - - - 8, 40 - - - 4, 4, 4, 4 - - - 792, 424 - - - 6 - - - ucLocalhostAccounts - - - ShareX.UploadersLib.AccountsControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tpSharedFolder - - - 6 - 8, 16 @@ -16374,9 +16504,6 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - Encrypted - True @@ -16622,6 +16749,18 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + colSeafileLibrarySize + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + colSeafileLibraryEncrypted + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + columnHeader1 @@ -16664,18 +16803,6 @@ For example, if your bucket is called bucket.example.com then URL will be http:/ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - colSeafileLibrarySize - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - colSeafileLibraryEncrypted - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - UploadersConfigForm diff --git a/ShareX.UploadersLib/UploadersConfig.cs b/ShareX.UploadersLib/UploadersConfig.cs index 45ad339eb..08aafac91 100644 --- a/ShareX.UploadersLib/UploadersConfig.cs +++ b/ShareX.UploadersLib/UploadersConfig.cs @@ -264,6 +264,8 @@ public class UploadersConfig : SettingsBase public string SeafileEncryptedLibraryPassword = ""; public bool SeafileCreateShareableURL = true; public bool SeafileIgnoreInvalidCert = false; + public int SeafileShareDaysToExpire = 7; + public string SeafileSharePassword = ""; public string SeafileAccInfoEmail = ""; public string SeafileAccInfoUsage = ""; diff --git a/ShareX/WorkerTask.cs b/ShareX/WorkerTask.cs index 07f1b71b6..2fab697c2 100644 --- a/ShareX/WorkerTask.cs +++ b/ShareX/WorkerTask.cs @@ -1084,6 +1084,8 @@ public UploadResult UploadFile(Stream stream, string fileName) Path = Program.UploadersConfig.SeafilePath, IsLibraryEncrypted = Program.UploadersConfig.SeafileIsLibraryEncrypted, EncryptedLibraryPassword = Program.UploadersConfig.SeafileEncryptedLibraryPassword, + ShareDaysToExpire = Program.UploadersConfig.SeafileShareDaysToExpire, + SharePassword = Program.UploadersConfig.SeafileSharePassword, CreateShareableURL = Program.UploadersConfig.SeafileCreateShareableURL, IgnoreInvalidCert = Program.UploadersConfig.SeafileIgnoreInvalidCert };