mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
FTP UI progress
This commit is contained in:
parent
6aed566706
commit
0e4e2da87d
4 changed files with 384 additions and 309 deletions
|
@ -170,41 +170,43 @@ private void InitializeComponent()
|
|||
this.tpFileUploaders = new System.Windows.Forms.TabPage();
|
||||
this.tcFileUploaders = new System.Windows.Forms.TabControl();
|
||||
this.tpFTP = new System.Windows.Forms.TabPage();
|
||||
this.btnFTPDuplicate = new System.Windows.Forms.Button();
|
||||
this.cbFTPRemoveFileExtension = new System.Windows.Forms.CheckBox();
|
||||
this.gbFTPAccount = new System.Windows.Forms.GroupBox();
|
||||
this.cbFTPAppendRemoteDirectory = new System.Windows.Forms.CheckBox();
|
||||
this.btnFTPTest = new System.Windows.Forms.Button();
|
||||
this.lblFTPProtocol = new System.Windows.Forms.Label();
|
||||
this.lblFTPName = new System.Windows.Forms.Label();
|
||||
this.cbFTPRemoveFileExtension = new System.Windows.Forms.CheckBox();
|
||||
this.txtFTPName = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPHost = new System.Windows.Forms.Label();
|
||||
this.eiFTP = new ShareX.HelpersLib.ExportImportControl();
|
||||
this.pFTPTransferMode = new System.Windows.Forms.Panel();
|
||||
this.rbFTPTransferModeActive = new System.Windows.Forms.RadioButton();
|
||||
this.rbFTPTransferModePassive = new System.Windows.Forms.RadioButton();
|
||||
this.btnFTPClient = new System.Windows.Forms.Button();
|
||||
this.txtFTPHost = new System.Windows.Forms.TextBox();
|
||||
this.pFTPProtocol = new System.Windows.Forms.Panel();
|
||||
this.rbFTPProtocolFTP = new System.Windows.Forms.RadioButton();
|
||||
this.rbFTPProtocolFTPS = new System.Windows.Forms.RadioButton();
|
||||
this.rbFTPProtocolSFTP = new System.Windows.Forms.RadioButton();
|
||||
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.lblFTPUsername = new System.Windows.Forms.Label();
|
||||
this.lblFTPURLPreview = new System.Windows.Forms.Label();
|
||||
this.txtFTPUsername = new System.Windows.Forms.TextBox();
|
||||
this.cbFTPURLPathProtocol = new System.Windows.Forms.ComboBox();
|
||||
this.lblFTPPassword = new System.Windows.Forms.Label();
|
||||
this.txtFTPURLPath = new System.Windows.Forms.TextBox();
|
||||
this.txtFTPPassword = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPURLPath = new System.Windows.Forms.Label();
|
||||
this.txtFTPRemoteDirectory = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPRemoteDirectory = new System.Windows.Forms.Label();
|
||||
this.txtFTPRemoteDirectory = new System.Windows.Forms.TextBox();
|
||||
this.btnFTPDuplicate = new System.Windows.Forms.Button();
|
||||
this.btnFTPRemove = new System.Windows.Forms.Button();
|
||||
this.btnFTPAdd = new System.Windows.Forms.Button();
|
||||
this.cbFTPAccounts = new System.Windows.Forms.ComboBox();
|
||||
this.lblFTPAccounts = new System.Windows.Forms.Label();
|
||||
this.txtFTPPassword = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPPassword = new System.Windows.Forms.Label();
|
||||
this.txtFTPUsername = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPUsername = new System.Windows.Forms.Label();
|
||||
this.nudFTPPort = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblFTPPort = new System.Windows.Forms.Label();
|
||||
this.txtFTPHost = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPHost = new System.Windows.Forms.Label();
|
||||
this.txtFTPName = new System.Windows.Forms.TextBox();
|
||||
this.lblFTPName = new System.Windows.Forms.Label();
|
||||
this.lblFTPProtocol = new System.Windows.Forms.Label();
|
||||
this.eiFTP = new ShareX.HelpersLib.ExportImportControl();
|
||||
this.btnFTPClient = new System.Windows.Forms.Button();
|
||||
this.lblFTPFile = new System.Windows.Forms.Label();
|
||||
this.lblFTPText = new System.Windows.Forms.Label();
|
||||
this.lblFTPImage = new System.Windows.Forms.Label();
|
||||
|
@ -634,8 +636,6 @@ private void InitializeComponent()
|
|||
this.lblWidthHint = new System.Windows.Forms.Label();
|
||||
this.ttlvMain = new ShareX.HelpersLib.TabToListView();
|
||||
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
|
||||
this.btnFTPTest = new System.Windows.Forms.Button();
|
||||
this.gbFTPAccount = new System.Windows.Forms.GroupBox();
|
||||
this.tpOtherUploaders.SuspendLayout();
|
||||
this.tcOtherUploaders.SuspendLayout();
|
||||
this.tpTwitter.SuspendLayout();
|
||||
|
@ -659,6 +659,7 @@ private void InitializeComponent()
|
|||
this.tpFileUploaders.SuspendLayout();
|
||||
this.tcFileUploaders.SuspendLayout();
|
||||
this.tpFTP.SuspendLayout();
|
||||
this.gbFTPAccount.SuspendLayout();
|
||||
this.pFTPTransferMode.SuspendLayout();
|
||||
this.pFTPProtocol.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudFTPPort)).BeginInit();
|
||||
|
@ -728,7 +729,6 @@ private void InitializeComponent()
|
|||
this.tpVgyme.SuspendLayout();
|
||||
this.tpSomeImage.SuspendLayout();
|
||||
this.tcUploaders.SuspendLayout();
|
||||
this.gbFTPAccount.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtRapidSharePremiumUserName
|
||||
|
@ -1804,11 +1804,60 @@ private void InitializeComponent()
|
|||
this.tpFTP.Name = "tpFTP";
|
||||
this.tpFTP.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnFTPDuplicate
|
||||
// gbFTPAccount
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPDuplicate, "btnFTPDuplicate");
|
||||
this.btnFTPDuplicate.Name = "btnFTPDuplicate";
|
||||
this.btnFTPDuplicate.UseVisualStyleBackColor = true;
|
||||
this.gbFTPAccount.Controls.Add(this.cbFTPAppendRemoteDirectory);
|
||||
this.gbFTPAccount.Controls.Add(this.btnFTPTest);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPProtocol);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPName);
|
||||
this.gbFTPAccount.Controls.Add(this.cbFTPRemoveFileExtension);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPName);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPHost);
|
||||
this.gbFTPAccount.Controls.Add(this.eiFTP);
|
||||
this.gbFTPAccount.Controls.Add(this.pFTPTransferMode);
|
||||
this.gbFTPAccount.Controls.Add(this.btnFTPClient);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPHost);
|
||||
this.gbFTPAccount.Controls.Add(this.pFTPProtocol);
|
||||
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.lblFTPUsername);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPURLPreview);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPUsername);
|
||||
this.gbFTPAccount.Controls.Add(this.cbFTPURLPathProtocol);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPPassword);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPURLPath);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPPassword);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPURLPath);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPRemoteDirectory);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPRemoteDirectory);
|
||||
resources.ApplyResources(this.gbFTPAccount, "gbFTPAccount");
|
||||
this.gbFTPAccount.Name = "gbFTPAccount";
|
||||
this.gbFTPAccount.TabStop = false;
|
||||
//
|
||||
// cbFTPAppendRemoteDirectory
|
||||
//
|
||||
resources.ApplyResources(this.cbFTPAppendRemoteDirectory, "cbFTPAppendRemoteDirectory");
|
||||
this.cbFTPAppendRemoteDirectory.Name = "cbFTPAppendRemoteDirectory";
|
||||
this.cbFTPAppendRemoteDirectory.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnFTPTest
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPTest, "btnFTPTest");
|
||||
this.btnFTPTest.Name = "btnFTPTest";
|
||||
this.btnFTPTest.UseVisualStyleBackColor = true;
|
||||
this.btnFTPTest.Click += new System.EventHandler(this.btnFTPTest_Click);
|
||||
//
|
||||
// lblFTPProtocol
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPProtocol, "lblFTPProtocol");
|
||||
this.lblFTPProtocol.Name = "lblFTPProtocol";
|
||||
//
|
||||
// lblFTPName
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPName, "lblFTPName");
|
||||
this.lblFTPName.Name = "lblFTPName";
|
||||
//
|
||||
// cbFTPRemoveFileExtension
|
||||
//
|
||||
|
@ -1816,11 +1865,23 @@ private void InitializeComponent()
|
|||
this.cbFTPRemoveFileExtension.Name = "cbFTPRemoveFileExtension";
|
||||
this.cbFTPRemoveFileExtension.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbFTPAppendRemoteDirectory
|
||||
// txtFTPName
|
||||
//
|
||||
resources.ApplyResources(this.cbFTPAppendRemoteDirectory, "cbFTPAppendRemoteDirectory");
|
||||
this.cbFTPAppendRemoteDirectory.Name = "cbFTPAppendRemoteDirectory";
|
||||
this.cbFTPAppendRemoteDirectory.UseVisualStyleBackColor = true;
|
||||
resources.ApplyResources(this.txtFTPName, "txtFTPName");
|
||||
this.txtFTPName.Name = "txtFTPName";
|
||||
//
|
||||
// lblFTPHost
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPHost, "lblFTPHost");
|
||||
this.lblFTPHost.Name = "lblFTPHost";
|
||||
//
|
||||
// eiFTP
|
||||
//
|
||||
resources.ApplyResources(this.eiFTP, "eiFTP");
|
||||
this.eiFTP.Name = "eiFTP";
|
||||
this.eiFTP.ObjectType = null;
|
||||
this.eiFTP.ExportRequested += new ShareX.HelpersLib.ExportImportControl.ExportEventHandler(this.eiFTP_ExportRequested);
|
||||
this.eiFTP.ImportRequested += new ShareX.HelpersLib.ExportImportControl.ImportEventHandler(this.eiFTP_ImportRequested);
|
||||
//
|
||||
// pFTPTransferMode
|
||||
//
|
||||
|
@ -1843,6 +1904,18 @@ private void InitializeComponent()
|
|||
this.rbFTPTransferModePassive.TabStop = true;
|
||||
this.rbFTPTransferModePassive.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnFTPClient
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPClient, "btnFTPClient");
|
||||
this.btnFTPClient.Name = "btnFTPClient";
|
||||
this.btnFTPClient.UseVisualStyleBackColor = true;
|
||||
this.btnFTPClient.Click += new System.EventHandler(this.btnFTPClient_Click);
|
||||
//
|
||||
// txtFTPHost
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPHost, "txtFTPHost");
|
||||
this.txtFTPHost.Name = "txtFTPHost";
|
||||
//
|
||||
// pFTPProtocol
|
||||
//
|
||||
resources.ApplyResources(this.pFTPProtocol, "pFTPProtocol");
|
||||
|
@ -1871,95 +1944,16 @@ private void InitializeComponent()
|
|||
this.rbFTPProtocolSFTP.Name = "rbFTPProtocolSFTP";
|
||||
this.rbFTPProtocolSFTP.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblFTPPort
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPPort, "lblFTPPort");
|
||||
this.lblFTPPort.Name = "lblFTPPort";
|
||||
//
|
||||
// lblFTPTransferMode
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPTransferMode, "lblFTPTransferMode");
|
||||
this.lblFTPTransferMode.Name = "lblFTPTransferMode";
|
||||
//
|
||||
// lblFTPPreviewOutput
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPPreviewOutput, "lblFTPPreviewOutput");
|
||||
this.lblFTPPreviewOutput.Name = "lblFTPPreviewOutput";
|
||||
//
|
||||
// lblFTPURLPreview
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPURLPreview, "lblFTPURLPreview");
|
||||
this.lblFTPURLPreview.Name = "lblFTPURLPreview";
|
||||
//
|
||||
// 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";
|
||||
//
|
||||
// txtFTPURLPath
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPURLPath, "txtFTPURLPath");
|
||||
this.txtFTPURLPath.Name = "txtFTPURLPath";
|
||||
//
|
||||
// lblFTPURLPath
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPURLPath, "lblFTPURLPath");
|
||||
this.lblFTPURLPath.Name = "lblFTPURLPath";
|
||||
//
|
||||
// txtFTPRemoteDirectory
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPRemoteDirectory, "txtFTPRemoteDirectory");
|
||||
this.txtFTPRemoteDirectory.Name = "txtFTPRemoteDirectory";
|
||||
//
|
||||
// lblFTPRemoteDirectory
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPRemoteDirectory, "lblFTPRemoteDirectory");
|
||||
this.lblFTPRemoteDirectory.Name = "lblFTPRemoteDirectory";
|
||||
//
|
||||
// btnFTPRemove
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPRemove, "btnFTPRemove");
|
||||
this.btnFTPRemove.Name = "btnFTPRemove";
|
||||
this.btnFTPRemove.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnFTPAdd
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPAdd, "btnFTPAdd");
|
||||
this.btnFTPAdd.Name = "btnFTPAdd";
|
||||
this.btnFTPAdd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbFTPAccounts
|
||||
//
|
||||
this.cbFTPAccounts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFTPAccounts.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFTPAccounts, "cbFTPAccounts");
|
||||
this.cbFTPAccounts.Name = "cbFTPAccounts";
|
||||
//
|
||||
// lblFTPAccounts
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPAccounts, "lblFTPAccounts");
|
||||
this.lblFTPAccounts.Name = "lblFTPAccounts";
|
||||
//
|
||||
// txtFTPPassword
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPPassword, "txtFTPPassword");
|
||||
this.txtFTPPassword.Name = "txtFTPPassword";
|
||||
//
|
||||
// lblFTPPassword
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPPassword, "lblFTPPassword");
|
||||
this.lblFTPPassword.Name = "lblFTPPassword";
|
||||
//
|
||||
// txtFTPUsername
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPUsername, "txtFTPUsername");
|
||||
this.txtFTPUsername.Name = "txtFTPUsername";
|
||||
this.txtFTPUsername.UseSystemPasswordChar = true;
|
||||
//
|
||||
// lblFTPUsername
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPUsername, "lblFTPUsername");
|
||||
this.lblFTPUsername.Name = "lblFTPUsername";
|
||||
//
|
||||
// nudFTPPort
|
||||
//
|
||||
resources.ApplyResources(this.nudFTPPort, "nudFTPPort");
|
||||
|
@ -1980,47 +1974,99 @@ private void InitializeComponent()
|
|||
0,
|
||||
0});
|
||||
//
|
||||
// lblFTPPort
|
||||
// lblFTPPreviewOutput
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPPort, "lblFTPPort");
|
||||
this.lblFTPPort.Name = "lblFTPPort";
|
||||
resources.ApplyResources(this.lblFTPPreviewOutput, "lblFTPPreviewOutput");
|
||||
this.lblFTPPreviewOutput.Name = "lblFTPPreviewOutput";
|
||||
//
|
||||
// txtFTPHost
|
||||
// lblFTPUsername
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPHost, "txtFTPHost");
|
||||
this.txtFTPHost.Name = "txtFTPHost";
|
||||
resources.ApplyResources(this.lblFTPUsername, "lblFTPUsername");
|
||||
this.lblFTPUsername.Name = "lblFTPUsername";
|
||||
//
|
||||
// lblFTPHost
|
||||
// lblFTPURLPreview
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPHost, "lblFTPHost");
|
||||
this.lblFTPHost.Name = "lblFTPHost";
|
||||
resources.ApplyResources(this.lblFTPURLPreview, "lblFTPURLPreview");
|
||||
this.lblFTPURLPreview.Name = "lblFTPURLPreview";
|
||||
//
|
||||
// txtFTPName
|
||||
// txtFTPUsername
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPName, "txtFTPName");
|
||||
this.txtFTPName.Name = "txtFTPName";
|
||||
resources.ApplyResources(this.txtFTPUsername, "txtFTPUsername");
|
||||
this.txtFTPUsername.Name = "txtFTPUsername";
|
||||
//
|
||||
// lblFTPName
|
||||
// cbFTPURLPathProtocol
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPName, "lblFTPName");
|
||||
this.lblFTPName.Name = "lblFTPName";
|
||||
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";
|
||||
//
|
||||
// lblFTPProtocol
|
||||
// lblFTPPassword
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPProtocol, "lblFTPProtocol");
|
||||
this.lblFTPProtocol.Name = "lblFTPProtocol";
|
||||
resources.ApplyResources(this.lblFTPPassword, "lblFTPPassword");
|
||||
this.lblFTPPassword.Name = "lblFTPPassword";
|
||||
//
|
||||
// eiFTP
|
||||
// txtFTPURLPath
|
||||
//
|
||||
resources.ApplyResources(this.eiFTP, "eiFTP");
|
||||
this.eiFTP.Name = "eiFTP";
|
||||
this.eiFTP.ObjectType = null;
|
||||
resources.ApplyResources(this.txtFTPURLPath, "txtFTPURLPath");
|
||||
this.txtFTPURLPath.Name = "txtFTPURLPath";
|
||||
//
|
||||
// btnFTPClient
|
||||
// txtFTPPassword
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPClient, "btnFTPClient");
|
||||
this.btnFTPClient.Name = "btnFTPClient";
|
||||
this.btnFTPClient.UseVisualStyleBackColor = true;
|
||||
resources.ApplyResources(this.txtFTPPassword, "txtFTPPassword");
|
||||
this.txtFTPPassword.Name = "txtFTPPassword";
|
||||
this.txtFTPPassword.UseSystemPasswordChar = true;
|
||||
//
|
||||
// lblFTPURLPath
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPURLPath, "lblFTPURLPath");
|
||||
this.lblFTPURLPath.Name = "lblFTPURLPath";
|
||||
//
|
||||
// lblFTPRemoteDirectory
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPRemoteDirectory, "lblFTPRemoteDirectory");
|
||||
this.lblFTPRemoteDirectory.Name = "lblFTPRemoteDirectory";
|
||||
//
|
||||
// txtFTPRemoteDirectory
|
||||
//
|
||||
resources.ApplyResources(this.txtFTPRemoteDirectory, "txtFTPRemoteDirectory");
|
||||
this.txtFTPRemoteDirectory.Name = "txtFTPRemoteDirectory";
|
||||
//
|
||||
// btnFTPDuplicate
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPDuplicate, "btnFTPDuplicate");
|
||||
this.btnFTPDuplicate.Name = "btnFTPDuplicate";
|
||||
this.btnFTPDuplicate.UseVisualStyleBackColor = true;
|
||||
this.btnFTPDuplicate.Click += new System.EventHandler(this.btnFTPDuplicate_Click);
|
||||
//
|
||||
// btnFTPRemove
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPRemove, "btnFTPRemove");
|
||||
this.btnFTPRemove.Name = "btnFTPRemove";
|
||||
this.btnFTPRemove.UseVisualStyleBackColor = true;
|
||||
this.btnFTPRemove.Click += new System.EventHandler(this.btnFTPRemove_Click);
|
||||
//
|
||||
// btnFTPAdd
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPAdd, "btnFTPAdd");
|
||||
this.btnFTPAdd.Name = "btnFTPAdd";
|
||||
this.btnFTPAdd.UseVisualStyleBackColor = true;
|
||||
this.btnFTPAdd.Click += new System.EventHandler(this.btnFTPAdd_Click);
|
||||
//
|
||||
// cbFTPAccounts
|
||||
//
|
||||
this.cbFTPAccounts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFTPAccounts.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFTPAccounts, "cbFTPAccounts");
|
||||
this.cbFTPAccounts.Name = "cbFTPAccounts";
|
||||
this.cbFTPAccounts.SelectedIndexChanged += new System.EventHandler(this.cbFTPAccounts_SelectedIndexChanged);
|
||||
//
|
||||
// lblFTPAccounts
|
||||
//
|
||||
resources.ApplyResources(this.lblFTPAccounts, "lblFTPAccounts");
|
||||
this.lblFTPAccounts.Name = "lblFTPAccounts";
|
||||
//
|
||||
// lblFTPFile
|
||||
//
|
||||
|
@ -2043,7 +2089,7 @@ private void InitializeComponent()
|
|||
this.cbFTPImage.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFTPImage, "cbFTPImage");
|
||||
this.cbFTPImage.Name = "cbFTPImage";
|
||||
this.cbFTPImage.SelectedIndexChanged += new System.EventHandler(this.cboFtpImages_SelectedIndexChanged);
|
||||
this.cbFTPImage.SelectedIndexChanged += new System.EventHandler(this.cbFTPImage_SelectedIndexChanged);
|
||||
//
|
||||
// cbFTPFile
|
||||
//
|
||||
|
@ -2051,7 +2097,7 @@ private void InitializeComponent()
|
|||
this.cbFTPFile.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFTPFile, "cbFTPFile");
|
||||
this.cbFTPFile.Name = "cbFTPFile";
|
||||
this.cbFTPFile.SelectedIndexChanged += new System.EventHandler(this.cboFtpFiles_SelectedIndexChanged);
|
||||
this.cbFTPFile.SelectedIndexChanged += new System.EventHandler(this.cbFTPFile_SelectedIndexChanged);
|
||||
//
|
||||
// cbFTPText
|
||||
//
|
||||
|
@ -2059,7 +2105,7 @@ private void InitializeComponent()
|
|||
this.cbFTPText.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFTPText, "cbFTPText");
|
||||
this.cbFTPText.Name = "cbFTPText";
|
||||
this.cbFTPText.SelectedIndexChanged += new System.EventHandler(this.cboFtpText_SelectedIndexChanged);
|
||||
this.cbFTPText.SelectedIndexChanged += new System.EventHandler(this.cbFTPText_SelectedIndexChanged);
|
||||
//
|
||||
// tpDropbox
|
||||
//
|
||||
|
@ -5104,44 +5150,6 @@ private void InitializeComponent()
|
|||
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
|
||||
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
|
||||
//
|
||||
// btnFTPTest
|
||||
//
|
||||
resources.ApplyResources(this.btnFTPTest, "btnFTPTest");
|
||||
this.btnFTPTest.Name = "btnFTPTest";
|
||||
this.btnFTPTest.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gbFTPAccount
|
||||
//
|
||||
this.gbFTPAccount.Controls.Add(this.cbFTPAppendRemoteDirectory);
|
||||
this.gbFTPAccount.Controls.Add(this.btnFTPTest);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPProtocol);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPName);
|
||||
this.gbFTPAccount.Controls.Add(this.cbFTPRemoveFileExtension);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPName);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPHost);
|
||||
this.gbFTPAccount.Controls.Add(this.eiFTP);
|
||||
this.gbFTPAccount.Controls.Add(this.pFTPTransferMode);
|
||||
this.gbFTPAccount.Controls.Add(this.btnFTPClient);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPHost);
|
||||
this.gbFTPAccount.Controls.Add(this.pFTPProtocol);
|
||||
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.lblFTPUsername);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPURLPreview);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPUsername);
|
||||
this.gbFTPAccount.Controls.Add(this.cbFTPURLPathProtocol);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPPassword);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPURLPath);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPPassword);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPURLPath);
|
||||
this.gbFTPAccount.Controls.Add(this.lblFTPRemoteDirectory);
|
||||
this.gbFTPAccount.Controls.Add(this.txtFTPRemoteDirectory);
|
||||
resources.ApplyResources(this.gbFTPAccount, "gbFTPAccount");
|
||||
this.gbFTPAccount.Name = "gbFTPAccount";
|
||||
this.gbFTPAccount.TabStop = false;
|
||||
//
|
||||
// UploadersConfigForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
|
@ -5191,6 +5199,8 @@ private void InitializeComponent()
|
|||
this.tcFileUploaders.ResumeLayout(false);
|
||||
this.tpFTP.ResumeLayout(false);
|
||||
this.tpFTP.PerformLayout();
|
||||
this.gbFTPAccount.ResumeLayout(false);
|
||||
this.gbFTPAccount.PerformLayout();
|
||||
this.pFTPTransferMode.ResumeLayout(false);
|
||||
this.pFTPTransferMode.PerformLayout();
|
||||
this.pFTPProtocol.ResumeLayout(false);
|
||||
|
@ -5314,8 +5324,6 @@ private void InitializeComponent()
|
|||
this.tpSomeImage.ResumeLayout(false);
|
||||
this.tpSomeImage.PerformLayout();
|
||||
this.tcUploaders.ResumeLayout(false);
|
||||
this.gbFTPAccount.ResumeLayout(false);
|
||||
this.gbFTPAccount.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
|
@ -100,15 +100,6 @@ private void InitializeControls()
|
|||
|
||||
txtCustomUploaderLog.AddContextMenu();
|
||||
|
||||
/*
|
||||
// FTP
|
||||
ucFTPAccounts.btnAdd.Click += FTPAccountAddButton_Click;
|
||||
ucFTPAccounts.btnRemove.Click += FTPAccountRemoveButton_Click;
|
||||
ucFTPAccounts.btnDuplicate.Click += FTPAccountDuplicateButton_Click;
|
||||
ucFTPAccounts.btnTest.Click += FTPAccountTestButton_Click;
|
||||
ucFTPAccounts.pgSettings.PropertyValueChanged += FtpAccountSettingsGrid_PropertyValueChanged;
|
||||
*/
|
||||
|
||||
// Localhost
|
||||
ucLocalhostAccounts.btnAdd.Click += LocalhostAccountAddButton_Click;
|
||||
ucLocalhostAccounts.btnRemove.Click += LocalhostAccountRemoveButton_Click;
|
||||
|
@ -328,22 +319,21 @@ public void LoadSettings()
|
|||
|
||||
#region File uploaders
|
||||
|
||||
/*
|
||||
// FTP
|
||||
|
||||
if (Config.FTPAccountList == null || Config.FTPAccountList.Count == 0)
|
||||
{
|
||||
FTPSetup(new List<FTPAccount>());
|
||||
FTPUpdateControls(new List<FTPAccount>());
|
||||
}
|
||||
else
|
||||
{
|
||||
FTPSetup(Config.FTPAccountList);
|
||||
if (ucFTPAccounts.lbAccounts.Items.Count > 0)
|
||||
FTPUpdateControls();
|
||||
|
||||
if (cbFTPAccounts.Items.Count > 0)
|
||||
{
|
||||
ucFTPAccounts.lbAccounts.SelectedIndex = 0;
|
||||
cbFTPAccounts.SelectedIndex = cbFTPImage.SelectedIndex;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Dropbox
|
||||
|
||||
|
@ -1282,103 +1272,99 @@ private void cbPastieIsPublic_CheckedChanged(object sender, EventArgs e)
|
|||
|
||||
#region FTP
|
||||
|
||||
private void cboFtpImages_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void cbFTPImage_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Config.FTPSelectedImage = cbFTPImage.SelectedIndex;
|
||||
}
|
||||
|
||||
private void cboFtpText_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void cbFTPText_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Config.FTPSelectedText = cbFTPText.SelectedIndex;
|
||||
}
|
||||
|
||||
private void cboFtpFiles_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void cbFTPFile_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Config.FTPSelectedFile = cbFTPFile.SelectedIndex;
|
||||
}
|
||||
|
||||
/*
|
||||
private void btnFtpClient_Click(object sender, EventArgs e)
|
||||
private void cbFTPAccounts_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
FTPOpenClient();
|
||||
FTPLoadSelectedAccount();
|
||||
}
|
||||
|
||||
private void btnFTPAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
FTPAddAccount(new FTPAccount());
|
||||
|
||||
cbFTPAccounts.SelectedIndex = cbFTPAccounts.Items.Count - 1;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
cbFTPAccounts.SelectedIndex = selected == cbFTPAccounts.Items.Count ? cbFTPAccounts.Items.Count - 1 : selected;
|
||||
}
|
||||
|
||||
FTPUpdateControls();
|
||||
}
|
||||
|
||||
private void btnFTPDuplicate_Click(object sender, EventArgs e)
|
||||
{
|
||||
FTPAccount account = FTPGetSelectedAccount();
|
||||
|
||||
if (account != null)
|
||||
{
|
||||
FTPAccount clone = account.Clone();
|
||||
FTPAddAccount(clone);
|
||||
|
||||
cbFTPAccounts.SelectedIndex = cbFTPAccounts.Items.Count - 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnFTPTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
FTPAccount account = FTPGetSelectedAccount();
|
||||
|
||||
if (account != null)
|
||||
{
|
||||
FTPTestAccountAsync(account);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Resources.UploadersConfigForm_FTPOpenClient_Unable_to_find_valid_FTP_account_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnFTPClient_Click(object sender, EventArgs e)
|
||||
{
|
||||
FTPAccount account = FTPGetSelectedAccount();
|
||||
|
||||
if (account != null)
|
||||
{
|
||||
FTPOpenClient(account);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Resources.UploadersConfigForm_FTPOpenClient_Unable_to_find_valid_FTP_account_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private object eiFTP_ExportRequested()
|
||||
{
|
||||
return GetSelectedFTPAccount();
|
||||
return FTPGetSelectedAccount();
|
||||
}
|
||||
|
||||
private void eiFTP_ImportRequested(object obj)
|
||||
{
|
||||
AddFTPAccount(obj as FTPAccount);
|
||||
FTPAddAccount(obj as FTPAccount);
|
||||
}
|
||||
|
||||
private void FTPSetup(IEnumerable<FTPAccount> accs)
|
||||
{
|
||||
if (accs != null)
|
||||
{
|
||||
int selFtpList = ucFTPAccounts.lbAccounts.SelectedIndex;
|
||||
|
||||
ucFTPAccounts.lbAccounts.Items.Clear();
|
||||
ucFTPAccounts.pgSettings.PropertySort = PropertySort.Categorized;
|
||||
cboFtpImages.Items.Clear();
|
||||
cboFtpText.Items.Clear();
|
||||
cboFtpFiles.Items.Clear();
|
||||
|
||||
Config.FTPAccountList = new List<FTPAccount>();
|
||||
Config.FTPAccountList.AddRange(accs);
|
||||
|
||||
foreach (FTPAccount acc in Config.FTPAccountList)
|
||||
{
|
||||
ucFTPAccounts.lbAccounts.Items.Add(acc);
|
||||
cboFtpImages.Items.Add(acc);
|
||||
cboFtpText.Items.Add(acc);
|
||||
cboFtpFiles.Items.Add(acc);
|
||||
}
|
||||
|
||||
if (ucFTPAccounts.lbAccounts.Items.Count > 0)
|
||||
{
|
||||
ucFTPAccounts.lbAccounts.SelectedIndex = selFtpList.Between(0, ucFTPAccounts.lbAccounts.Items.Count - 1);
|
||||
cboFtpImages.SelectedIndex = Config.FTPSelectedImage.Between(0, ucFTPAccounts.lbAccounts.Items.Count - 1);
|
||||
cboFtpText.SelectedIndex = Config.FTPSelectedText.Between(0, ucFTPAccounts.lbAccounts.Items.Count - 1);
|
||||
cboFtpFiles.SelectedIndex = Config.FTPSelectedFile.Between(0, ucFTPAccounts.lbAccounts.Items.Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void FTPAccountAddButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddFTPAccount(new FTPAccount());
|
||||
}
|
||||
|
||||
private void FTPAccountRemoveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
int sel = ucFTPAccounts.lbAccounts.SelectedIndex;
|
||||
if (ucFTPAccounts.RemoveItem(sel))
|
||||
{
|
||||
Config.FTPAccountList.RemoveAt(sel);
|
||||
}
|
||||
FTPSetup(Config.FTPAccountList);
|
||||
}
|
||||
|
||||
private void FTPAccountDuplicateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
FTPAccount src = (FTPAccount)ucFTPAccounts.lbAccounts.Items[ucFTPAccounts.lbAccounts.SelectedIndex];
|
||||
FTPAccount clone = src.Clone();
|
||||
AddFTPAccount(clone);
|
||||
}
|
||||
|
||||
private void FTPAccountTestButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TestFTPAccountAsync(GetSelectedFTPAccount());
|
||||
}
|
||||
|
||||
private void FtpAccountSettingsGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
|
||||
{
|
||||
FTPSetup(Config.FTPAccountList);
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion FTP
|
||||
|
||||
#region Dropbox
|
||||
|
|
|
@ -5051,7 +5051,7 @@ store.book[0].title</value>
|
|||
<value>0</value>
|
||||
</data>
|
||||
<data name="btnFTPTest.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>16, 296</value>
|
||||
<value>16, 344</value>
|
||||
</data>
|
||||
<data name="btnFTPTest.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>88, 24</value>
|
||||
|
@ -5204,7 +5204,7 @@ store.book[0].title</value>
|
|||
<value>6</value>
|
||||
</data>
|
||||
<data name="eiFTP.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>208, 296</value>
|
||||
<value>208, 344</value>
|
||||
</data>
|
||||
<data name="eiFTP.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>192, 24</value>
|
||||
|
@ -5279,7 +5279,7 @@ store.book[0].title</value>
|
|||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="btnFTPClient.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>112, 296</value>
|
||||
<value>112, 344</value>
|
||||
</data>
|
||||
<data name="btnFTPClient.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>88, 24</value>
|
||||
|
|
|
@ -945,71 +945,141 @@ private bool MinusHasFolder(string name)
|
|||
|
||||
#region FTP
|
||||
|
||||
public bool CheckFTPAccounts()
|
||||
public bool FTPCheckAccount(int index)
|
||||
{
|
||||
return Config.FTPAccountList.IsValidIndex(Config.FTPSelectedImage);
|
||||
return Config.FTPAccountList.IsValidIndex(index);
|
||||
}
|
||||
|
||||
/*
|
||||
public FTPAccount GetSelectedFTPAccount()
|
||||
public FTPAccount FTPGetSelectedAccount()
|
||||
{
|
||||
if (CheckFTPAccounts())
|
||||
int index = cbFTPAccounts.SelectedIndex;
|
||||
|
||||
if (FTPCheckAccount(index))
|
||||
{
|
||||
return Config.FTPAccountList[ucFTPAccounts.lbAccounts.SelectedIndex];
|
||||
return Config.FTPAccountList[index];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void AddFTPAccount(FTPAccount account)
|
||||
public void FTPAddAccount(FTPAccount account)
|
||||
{
|
||||
if (account != null)
|
||||
{
|
||||
Config.FTPAccountList.Add(account);
|
||||
ucFTPAccounts.AddItem(account);
|
||||
FTPSetup(Config.FTPAccountList);
|
||||
cbFTPAccounts.Items.Add(account);
|
||||
FTPUpdateControls();
|
||||
}
|
||||
}
|
||||
|
||||
public void TestFTPAccountAsync(FTPAccount acc)
|
||||
private void FTPUpdateControls()
|
||||
{
|
||||
if (acc != null)
|
||||
FTPUpdateControls(Config.FTPAccountList);
|
||||
}
|
||||
|
||||
private void FTPUpdateControls(List<FTPAccount> accounts)
|
||||
{
|
||||
if (accounts != null)
|
||||
{
|
||||
ucFTPAccounts.btnTest.Enabled = false;
|
||||
int selected = cbFTPAccounts.SelectedIndex;
|
||||
|
||||
cbFTPAccounts.Items.Clear();
|
||||
cbFTPImage.Items.Clear();
|
||||
cbFTPText.Items.Clear();
|
||||
cbFTPFile.Items.Clear();
|
||||
|
||||
Config.FTPAccountList = new List<FTPAccount>();
|
||||
Config.FTPAccountList.AddRange(accounts);
|
||||
|
||||
if (Config.FTPAccountList.Count > 0)
|
||||
{
|
||||
foreach (FTPAccount account in Config.FTPAccountList)
|
||||
{
|
||||
cbFTPAccounts.Items.Add(account);
|
||||
cbFTPImage.Items.Add(account);
|
||||
cbFTPText.Items.Add(account);
|
||||
cbFTPFile.Items.Add(account);
|
||||
}
|
||||
|
||||
cbFTPAccounts.SelectedIndex = selected.Between(0, Config.FTPAccountList.Count - 1);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void FTPLoadSelectedAccount()
|
||||
{
|
||||
FTPAccount account = FTPGetSelectedAccount();
|
||||
|
||||
if (account != null)
|
||||
{
|
||||
FTPLoadAccount(account);
|
||||
}
|
||||
}
|
||||
|
||||
public void FTPLoadAccount(FTPAccount account)
|
||||
{
|
||||
txtFTPName.Text = account.Name;
|
||||
|
||||
switch (account.Protocol)
|
||||
{
|
||||
case FTPProtocol.FTP:
|
||||
rbFTPProtocolFTP.Checked = true;
|
||||
break;
|
||||
case FTPProtocol.FTPS:
|
||||
rbFTPProtocolFTPS.Checked = true;
|
||||
break;
|
||||
case FTPProtocol.SFTP:
|
||||
rbFTPProtocolSFTP.Checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
txtFTPHost.Text = account.Host;
|
||||
nudFTPPort.Value = account.Port;
|
||||
txtFTPUsername.Text = account.Username;
|
||||
txtFTPPassword.Text = account.Password;
|
||||
|
||||
if (account.IsActive)
|
||||
{
|
||||
rbFTPTransferModeActive.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rbFTPTransferModePassive.Checked = true;
|
||||
}
|
||||
|
||||
txtFTPRemoteDirectory.Text = account.SubFolderPath;
|
||||
|
||||
// cbFTPURLPathProtocol
|
||||
|
||||
txtFTPURLPath.Text = account.HttpHomePath;
|
||||
cbFTPAppendRemoteDirectory.Checked = account.HttpHomePathAutoAddSubFolderPath;
|
||||
cbFTPRemoveFileExtension.Checked = account.HttpHomePathNoExtension;
|
||||
lblFTPPreviewOutput.Text = account.PreviewHttpPath;
|
||||
}
|
||||
|
||||
public void FTPTestAccountAsync(FTPAccount account)
|
||||
{
|
||||
if (account != null)
|
||||
{
|
||||
btnFTPTest.Enabled = false;
|
||||
|
||||
TaskEx.Run(() =>
|
||||
{
|
||||
TestFTPAccount(acc);
|
||||
FTPTestAccount(account);
|
||||
},
|
||||
() =>
|
||||
{
|
||||
ucFTPAccounts.btnTest.Enabled = true;
|
||||
btnFTPTest.Enabled = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void FTPOpenClient()
|
||||
{
|
||||
FTPAccount account = GetSelectedFTPAccount();
|
||||
|
||||
if (account != null)
|
||||
{
|
||||
if (account.Protocol == FTPProtocol.FTP || account.Protocol == FTPProtocol.FTPS)
|
||||
{
|
||||
new FTPClientForm(account).Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Resources.UploadersConfigForm_FTPOpenClient_FTP_client_only_supports_FTP_or_FTPS_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(Resources.UploadersConfigForm_FTPOpenClient_Unable_to_find_valid_FTP_account_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
public static void TestFTPAccount(FTPAccount account)
|
||||
public static void FTPTestAccount(FTPAccount account)
|
||||
{
|
||||
string msg = "";
|
||||
string remotePath = account.GetSubFolderPath();
|
||||
|
@ -1075,7 +1145,18 @@ public static void TestFTPAccount(FTPAccount account)
|
|||
|
||||
MessageBox.Show(msg, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
*/
|
||||
|
||||
private void FTPOpenClient(FTPAccount account)
|
||||
{
|
||||
if (account.Protocol == FTPProtocol.FTP || account.Protocol == FTPProtocol.FTPS)
|
||||
{
|
||||
new FTPClientForm(account).Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Resources.UploadersConfigForm_FTPOpenClient_FTP_client_only_supports_FTP_or_FTPS_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion FTP
|
||||
|
||||
|
|
Loading…
Reference in a new issue