FTP UI almost done

This commit is contained in:
Jaex 2017-04-20 19:38:20 +03:00
parent 0e4e2da87d
commit bceddbc6a9
5 changed files with 386 additions and 220 deletions

View file

@ -33,12 +33,12 @@ namespace ShareX.UploadersLib
{
public class FTPAccount : ICloneable
{
[Category("Account"), Description("Connection protocol"), DefaultValue(FTPProtocol.FTP)]
public FTPProtocol Protocol { get; set; }
[Category("FTP"), Description("Shown in the list as: Name - Server:Port")]
public string Name { get; set; }
[Category("Account"), Description("Connection protocol"), DefaultValue(FTPProtocol.FTP)]
public FTPProtocol Protocol { get; set; }
[Category("FTP"), Description("Host, e.g. google.com")]
public string Host { get; set; }
@ -51,6 +51,9 @@ public class FTPAccount : ICloneable
[Category("FTP"), PasswordPropertyText(true)]
public string Password { get; set; }
[Category("FTP"), Description("Set true for active or false for passive"), DefaultValue(false)]
public bool IsActive { get; set; }
[Category("FTP"), Description("FTP sub folder path, example: Screenshots.\r\nYou can use name parsing: %y = year, %mo = month.")]
public string SubFolderPath { get; set; }
@ -66,9 +69,6 @@ public class FTPAccount : ICloneable
[Category("FTP"), Description("Don't add file extension to URL"), DefaultValue(false)]
public bool HttpHomePathNoExtension { get; set; }
[Category("FTP"), Description("Set true for active or false for passive"), DefaultValue(false)]
public bool IsActive { get; set; }
[Category("FTP"), Description("Protocol://Host:Port"), Browsable(false)]
public string FTPAddress
{
@ -99,25 +99,13 @@ public string FTPAddress
}
}
private string exampleFilename = "screenshot.jpg";
private string exampleFilename = "screenshot.png";
[Category("FTP"), Description("Preview of the FTP path based on the settings above")]
public string PreviewFtpPath
{
get
{
return GetFtpPath(exampleFilename);
}
}
public string PreviewFtpPath => GetFtpPath(exampleFilename);
[Category("FTP"), Description("Preview of the HTTP path based on the settings above")]
public string PreviewHttpPath
{
get
{
return GetUriPath(exampleFilename);
}
}
public string PreviewHttpPath => GetUriPath(exampleFilename);
[Category("FTPS"), Description("Type of SSL to use. Explicit is TLS, Implicit is SSL."), DefaultValue(FTPSEncryption.Explicit)]
public FTPSEncryption FTPSEncryption { get; set; }
@ -126,25 +114,26 @@ public string PreviewHttpPath
[Editor(typeof(CertFileNameEditor), typeof(UITypeEditor))]
public string FTPSCertificateLocation { get; set; }
[Category("SFTP"), Description("OpenSSH key passphrase"), PasswordPropertyText(true)]
public string Passphrase { get; set; }
[Category("SFTP"), Description("Key location")]
[Editor(typeof(KeyFileNameEditor), typeof(UITypeEditor))]
public string Keypath { get; set; }
[Category("SFTP"), Description("OpenSSH key passphrase"), PasswordPropertyText(true)]
public string Passphrase { get; set; }
public FTPAccount()
{
Protocol = FTPProtocol.FTP;
Name = "New account";
Host = "host";
Protocol = FTPProtocol.FTP;
Host = "";
Port = 21;
IsActive = false;
SubFolderPath = "";
BrowserProtocol = BrowserProtocol.http;
HttpHomePath = "";
HttpHomePathAutoAddSubFolderPath = true;
HttpHomePathNoExtension = false;
IsActive = false;
FTPSEncryption = FTPSEncryption.Explicit;
FTPSCertificateLocation = "";
}
@ -157,13 +146,6 @@ public string GetSubFolderPath(string filename = null, NameParserType nameParser
public string GetHttpHomePath()
{
// @ deprecated
if (HttpHomePath.StartsWith("@"))
{
HttpHomePath = HttpHomePath.Substring(1);
HttpHomePathAutoAddSubFolderPath = false;
}
return NameParser.Parse(NameParserType.URL, HttpHomePath.Replace("%host", Host));
}
@ -265,7 +247,7 @@ public string GetFtpPath(string filemame)
public override string ToString()
{
return string.Format("{0} - {1}:{2}", Name, Host, Port);
return $"{Name} ({Host}:{Port})";
}
public FTPAccount Clone()

View file

@ -191,7 +191,7 @@ private void InitializeComponent()
this.lblFTPPort = new System.Windows.Forms.Label();
this.lblFTPTransferMode = new System.Windows.Forms.Label();
this.nudFTPPort = new System.Windows.Forms.NumericUpDown();
this.lblFTPPreviewOutput = new System.Windows.Forms.Label();
this.lblFTPURLPreviewValue = new System.Windows.Forms.Label();
this.lblFTPUsername = new System.Windows.Forms.Label();
this.lblFTPURLPreview = new System.Windows.Forms.Label();
this.txtFTPUsername = new System.Windows.Forms.TextBox();
@ -367,7 +367,7 @@ private void InitializeComponent()
this.tpJira = new System.Windows.Forms.TabPage();
this.txtJiraIssuePrefix = new System.Windows.Forms.TextBox();
this.lblJiraIssuePrefix = new System.Windows.Forms.Label();
this.gpJiraServer = new System.Windows.Forms.GroupBox();
this.gbJiraServer = new System.Windows.Forms.GroupBox();
this.txtJiraConfigHelp = new System.Windows.Forms.TextBox();
this.txtJiraHost = new System.Windows.Forms.TextBox();
this.lblJiraHost = new System.Windows.Forms.Label();
@ -454,12 +454,12 @@ private void InitializeComponent()
this.cbUpleaIsPremium = new System.Windows.Forms.CheckBox();
this.txtUpleaEmailAddress = new System.Windows.Forms.TextBox();
this.tpPlik = new System.Windows.Forms.TabPage();
this.gpPlikSettings = new System.Windows.Forms.GroupBox();
this.gbPlikSettings = new System.Windows.Forms.GroupBox();
this.cbPlikOneShot = new System.Windows.Forms.CheckBox();
this.txtPlikComment = new System.Windows.Forms.TextBox();
this.cbPlikComment = new System.Windows.Forms.CheckBox();
this.cbPlikRemovable = new System.Windows.Forms.CheckBox();
this.gpPlikLoginCredentials = new System.Windows.Forms.GroupBox();
this.gbPlikLoginCredentials = new System.Windows.Forms.GroupBox();
this.nudPlikTTL = new System.Windows.Forms.NumericUpDown();
this.cbxPlikTTLUnit = new System.Windows.Forms.ComboBox();
this.lblPlikTTL = new System.Windows.Forms.Label();
@ -684,7 +684,7 @@ private void InitializeComponent()
this.gbMinusUserPass.SuspendLayout();
this.gbMinusUpload.SuspendLayout();
this.tpJira.SuspendLayout();
this.gpJiraServer.SuspendLayout();
this.gbJiraServer.SuspendLayout();
this.tpLambda.SuspendLayout();
this.tpPomf.SuspendLayout();
this.tpSeafile.SuspendLayout();
@ -699,8 +699,8 @@ private void InitializeComponent()
this.gbUpleaLoginCredentials.SuspendLayout();
this.gbUpleaUserInformation.SuspendLayout();
this.tpPlik.SuspendLayout();
this.gpPlikSettings.SuspendLayout();
this.gpPlikLoginCredentials.SuspendLayout();
this.gbPlikSettings.SuspendLayout();
this.gbPlikLoginCredentials.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPlikTTL)).BeginInit();
this.tpSharedFolder.SuspendLayout();
this.tpEmail.SuspendLayout();
@ -1821,7 +1821,7 @@ private void InitializeComponent()
this.gbFTPAccount.Controls.Add(this.lblFTPPort);
this.gbFTPAccount.Controls.Add(this.lblFTPTransferMode);
this.gbFTPAccount.Controls.Add(this.nudFTPPort);
this.gbFTPAccount.Controls.Add(this.lblFTPPreviewOutput);
this.gbFTPAccount.Controls.Add(this.lblFTPURLPreviewValue);
this.gbFTPAccount.Controls.Add(this.lblFTPUsername);
this.gbFTPAccount.Controls.Add(this.lblFTPURLPreview);
this.gbFTPAccount.Controls.Add(this.txtFTPUsername);
@ -1841,6 +1841,7 @@ private void InitializeComponent()
resources.ApplyResources(this.cbFTPAppendRemoteDirectory, "cbFTPAppendRemoteDirectory");
this.cbFTPAppendRemoteDirectory.Name = "cbFTPAppendRemoteDirectory";
this.cbFTPAppendRemoteDirectory.UseVisualStyleBackColor = true;
this.cbFTPAppendRemoteDirectory.CheckedChanged += new System.EventHandler(this.cbFTPAppendRemoteDirectory_CheckedChanged);
//
// btnFTPTest
//
@ -1864,11 +1865,13 @@ private void InitializeComponent()
resources.ApplyResources(this.cbFTPRemoveFileExtension, "cbFTPRemoveFileExtension");
this.cbFTPRemoveFileExtension.Name = "cbFTPRemoveFileExtension";
this.cbFTPRemoveFileExtension.UseVisualStyleBackColor = true;
this.cbFTPRemoveFileExtension.CheckedChanged += new System.EventHandler(this.cbFTPRemoveFileExtension_CheckedChanged);
//
// txtFTPName
//
resources.ApplyResources(this.txtFTPName, "txtFTPName");
this.txtFTPName.Name = "txtFTPName";
this.txtFTPName.TextChanged += new System.EventHandler(this.txtFTPName_TextChanged);
//
// lblFTPHost
//
@ -1895,6 +1898,7 @@ private void InitializeComponent()
resources.ApplyResources(this.rbFTPTransferModeActive, "rbFTPTransferModeActive");
this.rbFTPTransferModeActive.Name = "rbFTPTransferModeActive";
this.rbFTPTransferModeActive.UseVisualStyleBackColor = true;
this.rbFTPTransferModeActive.CheckedChanged += new System.EventHandler(this.rbFTPTransferModeActive_CheckedChanged);
//
// rbFTPTransferModePassive
//
@ -1903,6 +1907,7 @@ private void InitializeComponent()
this.rbFTPTransferModePassive.Name = "rbFTPTransferModePassive";
this.rbFTPTransferModePassive.TabStop = true;
this.rbFTPTransferModePassive.UseVisualStyleBackColor = true;
this.rbFTPTransferModePassive.CheckedChanged += new System.EventHandler(this.rbFTPTransferModePassive_CheckedChanged);
//
// btnFTPClient
//
@ -1915,6 +1920,7 @@ private void InitializeComponent()
//
resources.ApplyResources(this.txtFTPHost, "txtFTPHost");
this.txtFTPHost.Name = "txtFTPHost";
this.txtFTPHost.TextChanged += new System.EventHandler(this.txtFTPHost_TextChanged);
//
// pFTPProtocol
//
@ -1931,18 +1937,21 @@ private void InitializeComponent()
this.rbFTPProtocolFTP.Name = "rbFTPProtocolFTP";
this.rbFTPProtocolFTP.TabStop = true;
this.rbFTPProtocolFTP.UseVisualStyleBackColor = true;
this.rbFTPProtocolFTP.CheckedChanged += new System.EventHandler(this.rbFTPProtocolFTP_CheckedChanged);
//
// rbFTPProtocolFTPS
//
resources.ApplyResources(this.rbFTPProtocolFTPS, "rbFTPProtocolFTPS");
this.rbFTPProtocolFTPS.Name = "rbFTPProtocolFTPS";
this.rbFTPProtocolFTPS.UseVisualStyleBackColor = true;
this.rbFTPProtocolFTPS.CheckedChanged += new System.EventHandler(this.rbFTPProtocolFTPS_CheckedChanged);
//
// rbFTPProtocolSFTP
//
resources.ApplyResources(this.rbFTPProtocolSFTP, "rbFTPProtocolSFTP");
this.rbFTPProtocolSFTP.Name = "rbFTPProtocolSFTP";
this.rbFTPProtocolSFTP.UseVisualStyleBackColor = true;
this.rbFTPProtocolSFTP.CheckedChanged += new System.EventHandler(this.rbFTPProtocolSFTP_CheckedChanged);
//
// lblFTPPort
//
@ -1973,11 +1982,12 @@ private void InitializeComponent()
0,
0,
0});
this.nudFTPPort.ValueChanged += new System.EventHandler(this.nudFTPPort_ValueChanged);
//
// lblFTPPreviewOutput
// lblFTPURLPreviewValue
//
resources.ApplyResources(this.lblFTPPreviewOutput, "lblFTPPreviewOutput");
this.lblFTPPreviewOutput.Name = "lblFTPPreviewOutput";
resources.ApplyResources(this.lblFTPURLPreviewValue, "lblFTPURLPreviewValue");
this.lblFTPURLPreviewValue.Name = "lblFTPURLPreviewValue";
//
// lblFTPUsername
//
@ -1993,15 +2003,15 @@ private void InitializeComponent()
//
resources.ApplyResources(this.txtFTPUsername, "txtFTPUsername");
this.txtFTPUsername.Name = "txtFTPUsername";
this.txtFTPUsername.TextChanged += new System.EventHandler(this.txtFTPUsername_TextChanged);
//
// cbFTPURLPathProtocol
//
this.cbFTPURLPathProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbFTPURLPathProtocol.FormattingEnabled = true;
this.cbFTPURLPathProtocol.Items.AddRange(new object[] {
resources.GetString("cbFTPURLPathProtocol.Items")});
resources.ApplyResources(this.cbFTPURLPathProtocol, "cbFTPURLPathProtocol");
this.cbFTPURLPathProtocol.Name = "cbFTPURLPathProtocol";
this.cbFTPURLPathProtocol.SelectedIndexChanged += new System.EventHandler(this.cbFTPURLPathProtocol_SelectedIndexChanged);
//
// lblFTPPassword
//
@ -2012,12 +2022,14 @@ private void InitializeComponent()
//
resources.ApplyResources(this.txtFTPURLPath, "txtFTPURLPath");
this.txtFTPURLPath.Name = "txtFTPURLPath";
this.txtFTPURLPath.TextChanged += new System.EventHandler(this.txtFTPURLPath_TextChanged);
//
// txtFTPPassword
//
resources.ApplyResources(this.txtFTPPassword, "txtFTPPassword");
this.txtFTPPassword.Name = "txtFTPPassword";
this.txtFTPPassword.UseSystemPasswordChar = true;
this.txtFTPPassword.TextChanged += new System.EventHandler(this.txtFTPPassword_TextChanged);
//
// lblFTPURLPath
//
@ -2033,6 +2045,7 @@ private void InitializeComponent()
//
resources.ApplyResources(this.txtFTPRemoteDirectory, "txtFTPRemoteDirectory");
this.txtFTPRemoteDirectory.Name = "txtFTPRemoteDirectory";
this.txtFTPRemoteDirectory.TextChanged += new System.EventHandler(this.txtFTPRemoteDirectory_TextChanged);
//
// btnFTPDuplicate
//
@ -3185,7 +3198,7 @@ private void InitializeComponent()
//
this.tpJira.Controls.Add(this.txtJiraIssuePrefix);
this.tpJira.Controls.Add(this.lblJiraIssuePrefix);
this.tpJira.Controls.Add(this.gpJiraServer);
this.tpJira.Controls.Add(this.gbJiraServer);
this.tpJira.Controls.Add(this.oAuthJira);
resources.ApplyResources(this.tpJira, "tpJira");
this.tpJira.Name = "tpJira";
@ -3202,14 +3215,14 @@ private void InitializeComponent()
resources.ApplyResources(this.lblJiraIssuePrefix, "lblJiraIssuePrefix");
this.lblJiraIssuePrefix.Name = "lblJiraIssuePrefix";
//
// gpJiraServer
// gbJiraServer
//
this.gpJiraServer.Controls.Add(this.txtJiraConfigHelp);
this.gpJiraServer.Controls.Add(this.txtJiraHost);
this.gpJiraServer.Controls.Add(this.lblJiraHost);
resources.ApplyResources(this.gpJiraServer, "gpJiraServer");
this.gpJiraServer.Name = "gpJiraServer";
this.gpJiraServer.TabStop = false;
this.gbJiraServer.Controls.Add(this.txtJiraConfigHelp);
this.gbJiraServer.Controls.Add(this.txtJiraHost);
this.gbJiraServer.Controls.Add(this.lblJiraHost);
resources.ApplyResources(this.gbJiraServer, "gbJiraServer");
this.gbJiraServer.Name = "gbJiraServer";
this.gbJiraServer.TabStop = false;
//
// txtJiraConfigHelp
//
@ -3814,21 +3827,21 @@ private void InitializeComponent()
//
// tpPlik
//
this.tpPlik.Controls.Add(this.gpPlikSettings);
this.tpPlik.Controls.Add(this.gpPlikLoginCredentials);
this.tpPlik.Controls.Add(this.gbPlikSettings);
this.tpPlik.Controls.Add(this.gbPlikLoginCredentials);
resources.ApplyResources(this.tpPlik, "tpPlik");
this.tpPlik.Name = "tpPlik";
this.tpPlik.UseVisualStyleBackColor = true;
//
// gpPlikSettings
// gbPlikSettings
//
this.gpPlikSettings.Controls.Add(this.cbPlikOneShot);
this.gpPlikSettings.Controls.Add(this.txtPlikComment);
this.gpPlikSettings.Controls.Add(this.cbPlikComment);
this.gpPlikSettings.Controls.Add(this.cbPlikRemovable);
resources.ApplyResources(this.gpPlikSettings, "gpPlikSettings");
this.gpPlikSettings.Name = "gpPlikSettings";
this.gpPlikSettings.TabStop = false;
this.gbPlikSettings.Controls.Add(this.cbPlikOneShot);
this.gbPlikSettings.Controls.Add(this.txtPlikComment);
this.gbPlikSettings.Controls.Add(this.cbPlikComment);
this.gbPlikSettings.Controls.Add(this.cbPlikRemovable);
resources.ApplyResources(this.gbPlikSettings, "gbPlikSettings");
this.gbPlikSettings.Name = "gbPlikSettings";
this.gbPlikSettings.TabStop = false;
//
// cbPlikOneShot
//
@ -3858,23 +3871,23 @@ private void InitializeComponent()
this.cbPlikRemovable.UseVisualStyleBackColor = true;
this.cbPlikRemovable.CheckedChanged += new System.EventHandler(this.cbPlikRemovable_CheckedChanged);
//
// gpPlikLoginCredentials
// gbPlikLoginCredentials
//
this.gpPlikLoginCredentials.Controls.Add(this.nudPlikTTL);
this.gpPlikLoginCredentials.Controls.Add(this.cbxPlikTTLUnit);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikTTL);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikURL);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikURL);
this.gpPlikLoginCredentials.Controls.Add(this.cbPlikIsSecured);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikAPIKey);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikAPIKey);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikPassword);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikUsername);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikPassword);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikLogin);
resources.ApplyResources(this.gpPlikLoginCredentials, "gpPlikLoginCredentials");
this.gpPlikLoginCredentials.Name = "gpPlikLoginCredentials";
this.gpPlikLoginCredentials.TabStop = false;
this.gbPlikLoginCredentials.Controls.Add(this.nudPlikTTL);
this.gbPlikLoginCredentials.Controls.Add(this.cbxPlikTTLUnit);
this.gbPlikLoginCredentials.Controls.Add(this.lblPlikTTL);
this.gbPlikLoginCredentials.Controls.Add(this.txtPlikURL);
this.gbPlikLoginCredentials.Controls.Add(this.lblPlikURL);
this.gbPlikLoginCredentials.Controls.Add(this.cbPlikIsSecured);
this.gbPlikLoginCredentials.Controls.Add(this.lblPlikAPIKey);
this.gbPlikLoginCredentials.Controls.Add(this.txtPlikAPIKey);
this.gbPlikLoginCredentials.Controls.Add(this.lblPlikPassword);
this.gbPlikLoginCredentials.Controls.Add(this.lblPlikUsername);
this.gbPlikLoginCredentials.Controls.Add(this.txtPlikPassword);
this.gbPlikLoginCredentials.Controls.Add(this.txtPlikLogin);
resources.ApplyResources(this.gbPlikLoginCredentials, "gbPlikLoginCredentials");
this.gbPlikLoginCredentials.Name = "gbPlikLoginCredentials";
this.gbPlikLoginCredentials.TabStop = false;
//
// nudPlikTTL
//
@ -5246,8 +5259,8 @@ private void InitializeComponent()
this.gbMinusUpload.PerformLayout();
this.tpJira.ResumeLayout(false);
this.tpJira.PerformLayout();
this.gpJiraServer.ResumeLayout(false);
this.gpJiraServer.PerformLayout();
this.gbJiraServer.ResumeLayout(false);
this.gbJiraServer.PerformLayout();
this.tpLambda.ResumeLayout(false);
this.tpLambda.PerformLayout();
this.tpPomf.ResumeLayout(false);
@ -5273,10 +5286,10 @@ private void InitializeComponent()
this.gbUpleaUserInformation.ResumeLayout(false);
this.gbUpleaUserInformation.PerformLayout();
this.tpPlik.ResumeLayout(false);
this.gpPlikSettings.ResumeLayout(false);
this.gpPlikSettings.PerformLayout();
this.gpPlikLoginCredentials.ResumeLayout(false);
this.gpPlikLoginCredentials.PerformLayout();
this.gbPlikSettings.ResumeLayout(false);
this.gbPlikSettings.PerformLayout();
this.gbPlikLoginCredentials.ResumeLayout(false);
this.gbPlikLoginCredentials.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPlikTTL)).EndInit();
this.tpSharedFolder.ResumeLayout(false);
this.tpSharedFolder.PerformLayout();
@ -5493,7 +5506,7 @@ private void InitializeComponent()
private System.Windows.Forms.ComboBox cboMinusFolders;
private System.Windows.Forms.TextBox txtJiraIssuePrefix;
private System.Windows.Forms.Label lblJiraIssuePrefix;
private System.Windows.Forms.GroupBox gpJiraServer;
private System.Windows.Forms.GroupBox gbJiraServer;
private System.Windows.Forms.TextBox txtJiraConfigHelp;
private System.Windows.Forms.TextBox txtJiraHost;
private System.Windows.Forms.Label lblJiraHost;
@ -5869,11 +5882,11 @@ private void InitializeComponent()
private System.Windows.Forms.Label lblAzureStorageContainer;
private System.Windows.Forms.Button btnAzureStoragePortal;
internal System.Windows.Forms.TabPage tpPlik;
private System.Windows.Forms.GroupBox gpPlikSettings;
private System.Windows.Forms.GroupBox gbPlikSettings;
private System.Windows.Forms.TextBox txtPlikComment;
private System.Windows.Forms.CheckBox cbPlikComment;
private System.Windows.Forms.CheckBox cbPlikRemovable;
private System.Windows.Forms.GroupBox gpPlikLoginCredentials;
private System.Windows.Forms.GroupBox gbPlikLoginCredentials;
private System.Windows.Forms.CheckBox cbPlikIsSecured;
private System.Windows.Forms.Label lblPlikAPIKey;
private System.Windows.Forms.TextBox txtPlikAPIKey;
@ -5909,7 +5922,7 @@ private void InitializeComponent()
private System.Windows.Forms.RadioButton rbFTPProtocolFTPS;
private System.Windows.Forms.RadioButton rbFTPProtocolSFTP;
private System.Windows.Forms.Label lblFTPTransferMode;
private System.Windows.Forms.Label lblFTPPreviewOutput;
private System.Windows.Forms.Label lblFTPURLPreviewValue;
private System.Windows.Forms.Label lblFTPURLPreview;
private System.Windows.Forms.ComboBox cbFTPURLPathProtocol;
private System.Windows.Forms.TextBox txtFTPURLPath;

View file

@ -98,7 +98,9 @@ private void InitializeControls()
CodeMenu.Create<CodeMenuEntryFilename>(txtCustomUploaderArgValue, CodeMenuEntryFilename.n, CodeMenuEntryFilename.t, CodeMenuEntryFilename.pn);
CodeMenu.Create<CodeMenuEntryFilename>(txtCustomUploaderHeaderValue, CodeMenuEntryFilename.n, CodeMenuEntryFilename.t, CodeMenuEntryFilename.pn);
txtCustomUploaderLog.AddContextMenu();
// FTP
cbFTPURLPathProtocol.Items.AddRange(Helpers.GetEnumDescriptions<BrowserProtocol>());
eiFTP.ObjectType = typeof(FTPAccount);
// Localhost
ucLocalhostAccounts.btnAdd.Click += LocalhostAccountAddButton_Click;
@ -107,9 +109,9 @@ private void InitializeControls()
ucLocalhostAccounts.btnTest.Visible = false;
ucLocalhostAccounts.pgSettings.PropertyValueChanged += SettingsGrid_LocalhostPropertyValueChanged;
eiFTP.ObjectType = typeof(FTPAccount);
// Custom uploader
txtCustomUploaderLog.AddContextMenu();
eiCustomUploaders.ObjectType = typeof(CustomUploaderItem);
txtCustomUploaderName.HandleCreated += (sender, e) => txtCustomUploaderName.SetWatermark("Name");
AddCustomUploaderDestinationTypes();
cbCustomUploaderRequestType.Items.AddRange(Enum.GetNames(typeof(CustomUploaderRequestType)));
@ -324,15 +326,13 @@ public void LoadSettings()
if (Config.FTPAccountList == null || Config.FTPAccountList.Count == 0)
{
FTPUpdateControls(new List<FTPAccount>());
FTPClearFields();
}
else
{
FTPUpdateControls();
if (cbFTPAccounts.Items.Count > 0)
{
cbFTPAccounts.SelectedIndex = cbFTPImage.SelectedIndex;
}
cbFTPAccounts.SelectedIndex = cbFTPImage.SelectedIndex;
FTPUpdateEnabledStates();
}
// Dropbox
@ -1303,15 +1303,22 @@ private void btnFTPRemove_Click(object sender, EventArgs e)
{
int selected = cbFTPAccounts.SelectedIndex;
cbFTPAccounts.Items.RemoveAt(selected);
Config.FTPAccountList.RemoveAt(selected);
if (cbFTPAccounts.Items.Count > 0)
if (selected > -1)
{
cbFTPAccounts.SelectedIndex = selected == cbFTPAccounts.Items.Count ? cbFTPAccounts.Items.Count - 1 : selected;
}
cbFTPAccounts.Items.RemoveAt(selected);
Config.FTPAccountList.RemoveAt(selected);
FTPUpdateControls();
if (cbFTPAccounts.Items.Count > 0)
{
cbFTPAccounts.SelectedIndex = selected == cbFTPAccounts.Items.Count ? cbFTPAccounts.Items.Count - 1 : selected;
}
else
{
FTPClearFields();
}
FTPUpdateControls();
}
}
private void btnFTPDuplicate_Click(object sender, EventArgs e)
@ -1327,6 +1334,148 @@ private void btnFTPDuplicate_Click(object sender, EventArgs e)
}
}
private void txtFTPName_TextChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Name = txtFTPName.Text;
}
}
private void rbFTPProtocolFTP_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Protocol = FTPProtocol.FTP;
}
}
private void rbFTPProtocolFTPS_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Protocol = FTPProtocol.FTPS;
}
}
private void rbFTPProtocolSFTP_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Protocol = FTPProtocol.SFTP;
}
}
private void txtFTPHost_TextChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Host = txtFTPHost.Text;
FTPUpdateURLPreview();
}
}
private void nudFTPPort_ValueChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Port = (int)nudFTPPort.Value;
FTPUpdateURLPreview();
}
}
private void txtFTPUsername_TextChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Username = txtFTPUsername.Text;
}
}
private void txtFTPPassword_TextChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.Password = txtFTPPassword.Text;
}
}
private void rbFTPTransferModePassive_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.IsActive = false;
}
}
private void rbFTPTransferModeActive_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.IsActive = true;
}
}
private void txtFTPRemoteDirectory_TextChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.SubFolderPath = txtFTPRemoteDirectory.Text;
FTPUpdateURLPreview();
}
}
private void cbFTPURLPathProtocol_SelectedIndexChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.BrowserProtocol = (BrowserProtocol)cbFTPURLPathProtocol.SelectedIndex;
FTPUpdateURLPreview();
}
}
private void txtFTPURLPath_TextChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.HttpHomePath = txtFTPURLPath.Text;
FTPUpdateURLPreview();
}
}
private void cbFTPAppendRemoteDirectory_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.HttpHomePathAutoAddSubFolderPath = cbFTPAppendRemoteDirectory.Checked;
FTPUpdateURLPreview();
}
}
private void cbFTPRemoveFileExtension_CheckedChanged(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
account.HttpHomePathNoExtension = cbFTPRemoveFileExtension.Checked;
FTPUpdateURLPreview();
}
}
private void btnFTPTest_Click(object sender, EventArgs e)
{
FTPAccount account = FTPGetSelectedAccount();

View file

@ -5464,31 +5464,31 @@ store.book[0].title</value>
<data name="&gt;&gt;nudFTPPort.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="lblFTPPreviewOutput.AutoSize" type="System.Boolean, mscorlib">
<data name="lblFTPURLPreviewValue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblFTPPreviewOutput.Location" type="System.Drawing.Point, System.Drawing">
<data name="lblFTPURLPreviewValue.Location" type="System.Drawing.Point, System.Drawing">
<value>157, 264</value>
</data>
<data name="lblFTPPreviewOutput.Size" type="System.Drawing.Size, System.Drawing">
<value>159, 13</value>
<data name="lblFTPURLPreviewValue.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 13</value>
</data>
<data name="lblFTPPreviewOutput.TabIndex" type="System.Int32, mscorlib">
<data name="lblFTPURLPreviewValue.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="lblFTPPreviewOutput.Text" xml:space="preserve">
<value>https://example.com/image.png</value>
<data name="lblFTPURLPreviewValue.Text" xml:space="preserve">
<value>http://example.com/screenshot.png</value>
</data>
<data name="&gt;&gt;lblFTPPreviewOutput.Name" xml:space="preserve">
<value>lblFTPPreviewOutput</value>
<data name="&gt;&gt;lblFTPURLPreviewValue.Name" xml:space="preserve">
<value>lblFTPURLPreviewValue</value>
</data>
<data name="&gt;&gt;lblFTPPreviewOutput.Type" xml:space="preserve">
<data name="&gt;&gt;lblFTPURLPreviewValue.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblFTPPreviewOutput.Parent" xml:space="preserve">
<data name="&gt;&gt;lblFTPURLPreviewValue.Parent" xml:space="preserve">
<value>gbFTPAccount</value>
</data>
<data name="&gt;&gt;lblFTPPreviewOutput.ZOrder" xml:space="preserve">
<data name="&gt;&gt;lblFTPURLPreviewValue.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="lblFTPUsername.AutoSize" type="System.Boolean, mscorlib">
@ -5566,9 +5566,6 @@ store.book[0].title</value>
<data name="&gt;&gt;txtFTPUsername.ZOrder" xml:space="preserve">
<value>18</value>
</data>
<data name="cbFTPURLPathProtocol.Items" xml:space="preserve">
<value>https://</value>
</data>
<data name="cbFTPURLPathProtocol.Location" type="System.Drawing.Point, System.Drawing">
<value>160, 188</value>
</data>
@ -5621,7 +5618,7 @@ store.book[0].title</value>
<value>240, 188</value>
</data>
<data name="txtFTPURLPath.Size" type="System.Drawing.Size, System.Drawing">
<value>288, 20</value>
<value>368, 20</value>
</data>
<data name="txtFTPURLPath.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
@ -5717,7 +5714,7 @@ store.book[0].title</value>
<value>160, 164</value>
</data>
<data name="txtFTPRemoteDirectory.Size" type="System.Drawing.Size, System.Drawing">
<value>288, 20</value>
<value>448, 20</value>
</data>
<data name="txtFTPRemoteDirectory.TabIndex" type="System.Int32, mscorlib">
<value>28</value>
@ -5735,7 +5732,7 @@ store.book[0].title</value>
<value>25</value>
</data>
<data name="gbFTPAccount.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 80</value>
<value>16, 72</value>
</data>
<data name="gbFTPAccount.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 384</value>
@ -5762,10 +5759,10 @@ store.book[0].title</value>
<value>NoControl</value>
</data>
<data name="btnFTPDuplicate.Location" type="System.Drawing.Point, System.Drawing">
<value>616, 51</value>
<value>696, 43</value>
</data>
<data name="btnFTPDuplicate.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
<value>96, 23</value>
</data>
<data name="btnFTPDuplicate.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
@ -5786,10 +5783,10 @@ store.book[0].title</value>
<value>1</value>
</data>
<data name="btnFTPRemove.Location" type="System.Drawing.Point, System.Drawing">
<value>536, 51</value>
<value>592, 43</value>
</data>
<data name="btnFTPRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
<value>96, 23</value>
</data>
<data name="btnFTPRemove.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
@ -5810,10 +5807,10 @@ store.book[0].title</value>
<value>2</value>
</data>
<data name="btnFTPAdd.Location" type="System.Drawing.Point, System.Drawing">
<value>456, 51</value>
<value>488, 43</value>
</data>
<data name="btnFTPAdd.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
<value>96, 23</value>
</data>
<data name="btnFTPAdd.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
@ -5834,10 +5831,10 @@ store.book[0].title</value>
<value>3</value>
</data>
<data name="cbFTPAccounts.Location" type="System.Drawing.Point, System.Drawing">
<value>160, 52</value>
<value>128, 44</value>
</data>
<data name="cbFTPAccounts.Size" type="System.Drawing.Size, System.Drawing">
<value>288, 21</value>
<value>352, 21</value>
</data>
<data name="cbFTPAccounts.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
@ -5858,7 +5855,7 @@ store.book[0].title</value>
<value>True</value>
</data>
<data name="lblFTPAccounts.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 56</value>
<value>13, 48</value>
</data>
<data name="lblFTPAccounts.Size" type="System.Drawing.Size, System.Drawing">
<value>55, 13</value>
@ -7954,16 +7951,16 @@ store.book[0].title</value>
<data name="&gt;&gt;lblJiraIssuePrefix.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;gpJiraServer.Name" xml:space="preserve">
<value>gpJiraServer</value>
<data name="&gt;&gt;gbJiraServer.Name" xml:space="preserve">
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;gpJiraServer.Type" xml:space="preserve">
<data name="&gt;&gt;gbJiraServer.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gpJiraServer.Parent" xml:space="preserve">
<data name="&gt;&gt;gbJiraServer.Parent" xml:space="preserve">
<value>tpJira</value>
</data>
<data name="&gt;&gt;gpJiraServer.ZOrder" xml:space="preserve">
<data name="&gt;&gt;gbJiraServer.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;oAuthJira.Name" xml:space="preserve">
@ -8740,28 +8737,28 @@ store.book[0].title</value>
<data name="&gt;&gt;tpUplea.ZOrder" xml:space="preserve">
<value>24</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Name" xml:space="preserve">
<value>gpPlikSettings</value>
<data name="&gt;&gt;gbPlikSettings.Name" xml:space="preserve">
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Type" xml:space="preserve">
<data name="&gt;&gt;gbPlikSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Parent" xml:space="preserve">
<data name="&gt;&gt;gbPlikSettings.Parent" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;gpPlikSettings.ZOrder" xml:space="preserve">
<data name="&gt;&gt;gbPlikSettings.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Name" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<data name="&gt;&gt;gbPlikLoginCredentials.Name" xml:space="preserve">
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Type" xml:space="preserve">
<data name="&gt;&gt;gbPlikLoginCredentials.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Parent" xml:space="preserve">
<data name="&gt;&gt;gbPlikLoginCredentials.Parent" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.ZOrder" xml:space="preserve">
<data name="&gt;&gt;gbPlikLoginCredentials.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tpPlik.Location" type="System.Drawing.Point, System.Drawing">
@ -13114,7 +13111,7 @@ store.book[0].title</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtJiraConfigHelp.Parent" xml:space="preserve">
<value>gpJiraServer</value>
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;txtJiraConfigHelp.ZOrder" xml:space="preserve">
<value>0</value>
@ -13126,7 +13123,7 @@ store.book[0].title</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtJiraHost.Parent" xml:space="preserve">
<value>gpJiraServer</value>
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;txtJiraHost.ZOrder" xml:space="preserve">
<value>1</value>
@ -13138,33 +13135,33 @@ store.book[0].title</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblJiraHost.Parent" xml:space="preserve">
<value>gpJiraServer</value>
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;lblJiraHost.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="gpJiraServer.Location" type="System.Drawing.Point, System.Drawing">
<data name="gbJiraServer.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 13</value>
</data>
<data name="gpJiraServer.Size" type="System.Drawing.Size, System.Drawing">
<data name="gbJiraServer.Size" type="System.Drawing.Size, System.Drawing">
<value>451, 358</value>
</data>
<data name="gpJiraServer.TabIndex" type="System.Int32, mscorlib">
<data name="gbJiraServer.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="gpJiraServer.Text" xml:space="preserve">
<data name="gbJiraServer.Text" xml:space="preserve">
<value>Jira server</value>
</data>
<data name="&gt;&gt;gpJiraServer.Name" xml:space="preserve">
<value>gpJiraServer</value>
<data name="&gt;&gt;gbJiraServer.Name" xml:space="preserve">
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;gpJiraServer.Type" xml:space="preserve">
<data name="&gt;&gt;gbJiraServer.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gpJiraServer.Parent" xml:space="preserve">
<data name="&gt;&gt;gbJiraServer.Parent" xml:space="preserve">
<value>tpJira</value>
</data>
<data name="&gt;&gt;gpJiraServer.ZOrder" xml:space="preserve">
<data name="&gt;&gt;gbJiraServer.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtJiraConfigHelp.Location" type="System.Drawing.Point, System.Drawing">
@ -13192,7 +13189,7 @@ store.book[0].title</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtJiraConfigHelp.Parent" xml:space="preserve">
<value>gpJiraServer</value>
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;txtJiraConfigHelp.ZOrder" xml:space="preserve">
<value>0</value>
@ -13216,7 +13213,7 @@ store.book[0].title</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtJiraHost.Parent" xml:space="preserve">
<value>gpJiraServer</value>
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;txtJiraHost.ZOrder" xml:space="preserve">
<value>1</value>
@ -13246,7 +13243,7 @@ store.book[0].title</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblJiraHost.Parent" xml:space="preserve">
<value>gpJiraServer</value>
<value>gbJiraServer</value>
</data>
<data name="&gt;&gt;lblJiraHost.ZOrder" xml:space="preserve">
<value>2</value>
@ -15485,7 +15482,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.ZOrder" xml:space="preserve">
<value>0</value>
@ -15497,7 +15494,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikComment.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;txtPlikComment.ZOrder" xml:space="preserve">
<value>1</value>
@ -15509,7 +15506,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikComment.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikComment.ZOrder" xml:space="preserve">
<value>2</value>
@ -15521,33 +15518,33 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="gpPlikSettings.Location" type="System.Drawing.Point, System.Drawing">
<data name="gbPlikSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>292, 19</value>
</data>
<data name="gpPlikSettings.Size" type="System.Drawing.Size, System.Drawing">
<data name="gbPlikSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>344, 247</value>
</data>
<data name="gpPlikSettings.TabIndex" type="System.Int32, mscorlib">
<data name="gbPlikSettings.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="gpPlikSettings.Text" xml:space="preserve">
<data name="gbPlikSettings.Text" xml:space="preserve">
<value>Other settings</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Name" xml:space="preserve">
<value>gpPlikSettings</value>
<data name="&gt;&gt;gbPlikSettings.Name" xml:space="preserve">
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Type" xml:space="preserve">
<data name="&gt;&gt;gbPlikSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Parent" xml:space="preserve">
<data name="&gt;&gt;gbPlikSettings.Parent" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;gpPlikSettings.ZOrder" xml:space="preserve">
<data name="&gt;&gt;gbPlikSettings.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cbPlikOneShot.AutoSize" type="System.Boolean, mscorlib">
@ -15575,7 +15572,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.ZOrder" xml:space="preserve">
<value>0</value>
@ -15599,7 +15596,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikComment.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;txtPlikComment.ZOrder" xml:space="preserve">
<value>1</value>
@ -15629,7 +15626,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikComment.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikComment.ZOrder" xml:space="preserve">
<value>2</value>
@ -15659,7 +15656,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
<value>gbPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.ZOrder" xml:space="preserve">
<value>3</value>
@ -15671,7 +15668,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;nudPlikTTL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;nudPlikTTL.ZOrder" xml:space="preserve">
<value>0</value>
@ -15683,7 +15680,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.ZOrder" xml:space="preserve">
<value>1</value>
@ -15695,7 +15692,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikTTL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikTTL.ZOrder" xml:space="preserve">
<value>2</value>
@ -15707,7 +15704,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikURL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikURL.ZOrder" xml:space="preserve">
<value>3</value>
@ -15719,7 +15716,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikURL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikURL.ZOrder" xml:space="preserve">
<value>4</value>
@ -15731,7 +15728,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.ZOrder" xml:space="preserve">
<value>5</value>
@ -15743,7 +15740,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.ZOrder" xml:space="preserve">
<value>6</value>
@ -15755,7 +15752,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.ZOrder" xml:space="preserve">
<value>7</value>
@ -15767,7 +15764,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikPassword.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikPassword.ZOrder" xml:space="preserve">
<value>8</value>
@ -15779,7 +15776,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikUsername.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikUsername.ZOrder" xml:space="preserve">
<value>9</value>
@ -15791,7 +15788,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikPassword.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikPassword.ZOrder" xml:space="preserve">
<value>10</value>
@ -15803,33 +15800,33 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikLogin.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikLogin.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="gpPlikLoginCredentials.Location" type="System.Drawing.Point, System.Drawing">
<data name="gbPlikLoginCredentials.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 19</value>
</data>
<data name="gpPlikLoginCredentials.Size" type="System.Drawing.Size, System.Drawing">
<data name="gbPlikLoginCredentials.Size" type="System.Drawing.Size, System.Drawing">
<value>271, 247</value>
</data>
<data name="gpPlikLoginCredentials.TabIndex" type="System.Int32, mscorlib">
<data name="gbPlikLoginCredentials.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="gpPlikLoginCredentials.Text" xml:space="preserve">
<data name="gbPlikLoginCredentials.Text" xml:space="preserve">
<value>Login Credentials</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Name" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<data name="&gt;&gt;gbPlikLoginCredentials.Name" xml:space="preserve">
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Type" xml:space="preserve">
<data name="&gt;&gt;gbPlikLoginCredentials.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Parent" xml:space="preserve">
<data name="&gt;&gt;gbPlikLoginCredentials.Parent" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.ZOrder" xml:space="preserve">
<data name="&gt;&gt;gbPlikLoginCredentials.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="nudPlikTTL.Location" type="System.Drawing.Point, System.Drawing">
@ -15848,7 +15845,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;nudPlikTTL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;nudPlikTTL.ZOrder" xml:space="preserve">
<value>0</value>
@ -15878,7 +15875,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.ZOrder" xml:space="preserve">
<value>1</value>
@ -15908,7 +15905,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikTTL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikTTL.ZOrder" xml:space="preserve">
<value>2</value>
@ -15929,7 +15926,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikURL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikURL.ZOrder" xml:space="preserve">
<value>3</value>
@ -15959,7 +15956,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikURL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikURL.ZOrder" xml:space="preserve">
<value>4</value>
@ -15989,7 +15986,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.ZOrder" xml:space="preserve">
<value>5</value>
@ -16019,7 +16016,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.ZOrder" xml:space="preserve">
<value>6</value>
@ -16040,7 +16037,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.ZOrder" xml:space="preserve">
<value>7</value>
@ -16070,7 +16067,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikPassword.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikPassword.ZOrder" xml:space="preserve">
<value>8</value>
@ -16100,7 +16097,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblPlikUsername.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikUsername.ZOrder" xml:space="preserve">
<value>9</value>
@ -16124,7 +16121,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikPassword.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikPassword.ZOrder" xml:space="preserve">
<value>10</value>
@ -16145,7 +16142,7 @@ Using an encrypted library disables sharing.</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPlikLogin.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
<value>gbPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikLogin.ZOrder" xml:space="preserve">
<value>11</value>

View file

@ -1005,12 +1005,18 @@ private void FTPUpdateControls(List<FTPAccount> accounts)
cbFTPImage.SelectedIndex = Config.FTPSelectedImage.Between(0, Config.FTPAccountList.Count - 1);
cbFTPText.SelectedIndex = Config.FTPSelectedText.Between(0, Config.FTPAccountList.Count - 1);
cbFTPFile.SelectedIndex = Config.FTPSelectedFile.Between(0, Config.FTPAccountList.Count - 1);
FTPLoadSelectedAccount();
}
FTPUpdateEnabledStates();
}
}
private void FTPUpdateEnabledStates()
{
cbFTPImage.Enabled = cbFTPText.Enabled = cbFTPFile.Enabled = cbFTPAccounts.Enabled = cbFTPAccounts.Items.Count > 0;
btnFTPRemove.Enabled = btnFTPDuplicate.Enabled = gbFTPAccount.Enabled = cbFTPAccounts.SelectedIndex > -1;
}
public void FTPLoadSelectedAccount()
{
FTPAccount account = FTPGetSelectedAccount();
@ -1053,13 +1059,32 @@ public void FTPLoadAccount(FTPAccount account)
}
txtFTPRemoteDirectory.Text = account.SubFolderPath;
// cbFTPURLPathProtocol
cbFTPURLPathProtocol.SelectedIndex = (int)account.BrowserProtocol;
txtFTPURLPath.Text = account.HttpHomePath;
cbFTPAppendRemoteDirectory.Checked = account.HttpHomePathAutoAddSubFolderPath;
cbFTPRemoveFileExtension.Checked = account.HttpHomePathNoExtension;
lblFTPPreviewOutput.Text = account.PreviewHttpPath;
lblFTPURLPreviewValue.Text = account.PreviewHttpPath;
}
public void FTPClearFields()
{
FTPAccount account = new FTPAccount()
{
Name = "",
HttpHomePathAutoAddSubFolderPath = false
};
FTPLoadAccount(account);
}
public void FTPUpdateURLPreview()
{
FTPAccount account = FTPGetSelectedAccount();
if (account != null)
{
lblFTPURLPreviewValue.Text = account.PreviewHttpPath;
}
}
public void FTPTestAccountAsync(FTPAccount account)