FTP ui changes

This commit is contained in:
Jaex 2014-04-30 12:46:15 +03:00
parent a125ba0989
commit 47c4a7a54e
8 changed files with 484 additions and 531 deletions

View file

@ -265,7 +265,7 @@ public FTPAccount Clone()
object ICloneable.Clone()
{
return MemberwiseClone();
return Clone();
}
}
}

View file

@ -33,7 +33,7 @@ You should have received a copy of the GNU General Public License
namespace UploadersLib
{
public class LocalhostAccount
public class LocalhostAccount : ICloneable
{
[Category("Localhost"), Description("Shown in the list as: Name - LocalhostRoot:Port")]
public string Name { get; set; }
@ -218,5 +218,15 @@ public override string ToString()
{
return string.Format("{0} - {1}:{2}", Name, LocalhostRoot, Port);
}
public LocalhostAccount Clone()
{
return MemberwiseClone() as LocalhostAccount;
}
object ICloneable.Clone()
{
return Clone();
}
}
}

View file

@ -28,59 +28,59 @@ protected override void Dispose(bool disposing)
/// </summary>
private void InitializeComponent()
{
this.SettingsGrid = new System.Windows.Forms.PropertyGrid();
this.AccountsList = new System.Windows.Forms.ListBox();
this.pgSettings = new System.Windows.Forms.PropertyGrid();
this.lbAccounts = new System.Windows.Forms.ListBox();
this.btnAdd = new System.Windows.Forms.Button();
this.btnTest = new System.Windows.Forms.Button();
this.btnRemove = new System.Windows.Forms.Button();
this.AccountsLayout = new System.Windows.Forms.TableLayoutPanel();
this.btnClone = new System.Windows.Forms.Button();
this.btnDuplicate = new System.Windows.Forms.Button();
this.AccountsLayout.SuspendLayout();
this.SuspendLayout();
//
// SettingsGrid
// pgSettings
//
this.SettingsGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.SettingsGrid.Location = new System.Drawing.Point(258, 3);
this.SettingsGrid.Name = "SettingsGrid";
this.SettingsGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort;
this.SettingsGrid.Size = new System.Drawing.Size(481, 345);
this.SettingsGrid.TabIndex = 1;
this.SettingsGrid.ToolbarVisible = false;
this.SettingsGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.SettingsGrid_PropertyValueChanged);
this.pgSettings.Dock = System.Windows.Forms.DockStyle.Fill;
this.pgSettings.Location = new System.Drawing.Point(200, 0);
this.pgSettings.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.pgSettings.Name = "pgSettings";
this.pgSettings.PropertySort = System.Windows.Forms.PropertySort.NoSort;
this.pgSettings.Size = new System.Drawing.Size(544, 352);
this.pgSettings.TabIndex = 1;
this.pgSettings.ToolbarVisible = false;
this.pgSettings.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.pgSettings_PropertyValueChanged);
//
// AccountsList
// lbAccounts
//
this.AccountsList.Dock = System.Windows.Forms.DockStyle.Fill;
this.AccountsList.FormattingEnabled = true;
this.AccountsList.IntegralHeight = false;
this.AccountsList.Location = new System.Drawing.Point(3, 3);
this.AccountsList.Name = "AccountsList";
this.AccountsList.Size = new System.Drawing.Size(249, 345);
this.AccountsList.TabIndex = 0;
this.AccountsList.SelectedIndexChanged += new System.EventHandler(this.AccountsList_SelectedIndexChanged);
this.lbAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbAccounts.FormattingEnabled = true;
this.lbAccounts.IntegralHeight = false;
this.lbAccounts.Location = new System.Drawing.Point(0, 0);
this.lbAccounts.Margin = new System.Windows.Forms.Padding(0);
this.lbAccounts.Name = "lbAccounts";
this.lbAccounts.Size = new System.Drawing.Size(197, 352);
this.lbAccounts.TabIndex = 0;
this.lbAccounts.SelectedIndexChanged += new System.EventHandler(this.lbAccounts_SelectedIndexChanged);
//
// btnAdd
//
this.btnAdd.BackColor = System.Drawing.Color.Transparent;
this.btnAdd.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnAdd.Location = new System.Drawing.Point(8, 8);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(64, 24);
this.btnAdd.TabIndex = 0;
this.btnAdd.Text = "Add";
this.btnAdd.UseVisualStyleBackColor = false;
this.btnAdd.UseVisualStyleBackColor = true;
//
// btnTest
//
this.btnTest.BackColor = System.Drawing.Color.Transparent;
this.btnTest.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnTest.Location = new System.Drawing.Point(152, 8);
this.btnTest.Location = new System.Drawing.Point(224, 8);
this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(64, 24);
this.btnTest.TabIndex = 2;
this.btnTest.Text = "Test...";
this.btnTest.UseVisualStyleBackColor = false;
this.btnTest.Text = "Test";
this.btnTest.UseVisualStyleBackColor = true;
//
// btnRemove
//
@ -98,32 +98,31 @@ private void InitializeComponent()
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AccountsLayout.ColumnCount = 2;
this.AccountsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34.4086F));
this.AccountsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 65.5914F));
this.AccountsLayout.Controls.Add(this.SettingsGrid, 1, 0);
this.AccountsLayout.Controls.Add(this.AccountsList, -1, 0);
this.AccountsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.54987F));
this.AccountsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 73.45013F));
this.AccountsLayout.Controls.Add(this.pgSettings, 1, 0);
this.AccountsLayout.Controls.Add(this.lbAccounts, -1, 0);
this.AccountsLayout.Location = new System.Drawing.Point(8, 40);
this.AccountsLayout.Name = "AccountsLayout";
this.AccountsLayout.RowCount = 1;
this.AccountsLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.AccountsLayout.Size = new System.Drawing.Size(742, 351);
this.AccountsLayout.Size = new System.Drawing.Size(744, 352);
this.AccountsLayout.TabIndex = 4;
//
// btnClone
// btnDuplicate
//
this.btnClone.Location = new System.Drawing.Point(224, 8);
this.btnClone.Name = "btnClone";
this.btnClone.Size = new System.Drawing.Size(72, 24);
this.btnClone.TabIndex = 3;
this.btnClone.Text = "&Clone";
this.btnClone.UseVisualStyleBackColor = true;
this.btnClone.Visible = false;
this.btnDuplicate.Location = new System.Drawing.Point(152, 8);
this.btnDuplicate.Name = "btnDuplicate";
this.btnDuplicate.Size = new System.Drawing.Size(64, 24);
this.btnDuplicate.TabIndex = 3;
this.btnDuplicate.Text = "Duplicate";
this.btnDuplicate.UseVisualStyleBackColor = true;
//
// AccountsControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnClone);
this.Controls.Add(this.btnDuplicate);
this.Controls.Add(this.AccountsLayout);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.btnTest);
@ -141,8 +140,8 @@ private void InitializeComponent()
public System.Windows.Forms.Button btnTest;
public System.Windows.Forms.Button btnRemove;
private System.Windows.Forms.TableLayoutPanel AccountsLayout;
public System.Windows.Forms.PropertyGrid SettingsGrid;
public System.Windows.Forms.ListBox AccountsList;
public System.Windows.Forms.Button btnClone;
public System.Windows.Forms.PropertyGrid pgSettings;
public System.Windows.Forms.ListBox lbAccounts;
public System.Windows.Forms.Button btnDuplicate;
}
}

View file

@ -36,38 +36,50 @@ public AccountsControl()
InitializeComponent();
}
public virtual bool RemoveItem(int selected)
public void AddItem(object item)
{
if (selected.IsBetween(0, AccountsList.Items.Count - 1))
{
AccountsList.Items.RemoveAt(selected);
lbAccounts.Items.Add(item);
lbAccounts.SelectedIndex = lbAccounts.Items.Count - 1;
}
if (AccountsList.Items.Count > 0)
public bool RemoveItem(int selected)
{
if (selected.IsBetween(0, lbAccounts.Items.Count - 1))
{
lbAccounts.Items.RemoveAt(selected);
if (lbAccounts.Items.Count > 0)
{
AccountsList.SelectedIndex = (selected > 0) ? (selected - 1) : 0;
SettingsGrid.SelectedObject = AccountsList.Items[selected.Between(0, selected - 1)];
lbAccounts.SelectedIndex = selected == lbAccounts.Items.Count ? lbAccounts.Items.Count - 1 : selected;
pgSettings.SelectedObject = lbAccounts.Items[lbAccounts.SelectedIndex];
}
else
{
SettingsGrid.SelectedObject = null;
pgSettings.SelectedObject = null;
}
return true;
}
return false;
}
private void SettingsGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
private void pgSettings_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
if (AccountsList.SelectedIndex > -1)
if (lbAccounts.SelectedIndex > -1)
{
AccountsList.Items[AccountsList.SelectedIndex] = SettingsGrid.SelectedObject;
lbAccounts.Items[lbAccounts.SelectedIndex] = pgSettings.SelectedObject;
}
}
public virtual void AccountsList_SelectedIndexChanged(object sender, EventArgs e)
private void lbAccounts_SelectedIndexChanged(object sender, EventArgs e)
{
btnClone.Enabled = AccountsList.SelectedIndex > -1;
btnRemove.Enabled = btnDuplicate.Enabled = btnTest.Enabled = lbAccounts.SelectedIndex > -1;
if (lbAccounts.SelectedIndex > -1)
{
pgSettings.SelectedObject = lbAccounts.Items[lbAccounts.SelectedIndex];
}
}
}
}

View file

@ -34,6 +34,7 @@ private void InitializeComponent()
this.tpImageUploaders = new System.Windows.Forms.TabPage();
this.tcImageUploaders = new System.Windows.Forms.TabControl();
this.tpImgur = new System.Windows.Forms.TabPage();
this.oauth2Imgur = new UploadersLib.GUI.OAuth2Control();
this.txtImgurAlbumID = new System.Windows.Forms.TextBox();
this.lblImgurAlbumID = new System.Windows.Forms.Label();
this.lvImgurAlbumList = new System.Windows.Forms.ListView();
@ -43,7 +44,9 @@ private void InitializeComponent()
this.btnImgurRefreshAlbumList = new System.Windows.Forms.Button();
this.cbImgurThumbnailType = new System.Windows.Forms.ComboBox();
this.lblImgurThumbnailType = new System.Windows.Forms.Label();
this.atcImgurAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpImageShack = new System.Windows.Forms.TabPage();
this.atcImageShackAccountType = new UploadersLib.GUI.AccountTypeControl();
this.btnImageShackLogin = new System.Windows.Forms.Button();
this.btnImageShackOpenPublicProfile = new System.Windows.Forms.Button();
this.cbImageShackIsPublic = new System.Windows.Forms.CheckBox();
@ -53,6 +56,7 @@ private void InitializeComponent()
this.txtImageShackPassword = new System.Windows.Forms.TextBox();
this.lblImageShackPassword = new System.Windows.Forms.Label();
this.tpTinyPic = new System.Windows.Forms.TabPage();
this.atcTinyPicAccountType = new UploadersLib.GUI.AccountTypeControl();
this.btnTinyPicLogin = new System.Windows.Forms.Button();
this.txtTinyPicPassword = new System.Windows.Forms.TextBox();
this.lblTinyPicPassword = new System.Windows.Forms.Label();
@ -105,6 +109,7 @@ private void InitializeComponent()
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnPicasaRefreshAlbumList = new System.Windows.Forms.Button();
this.oauth2Picasa = new UploadersLib.GUI.OAuth2Control();
this.tpTextUploaders = new System.Windows.Forms.TabPage();
this.tcTextUploaders = new System.Windows.Forms.TabControl();
this.tpPastebin = new System.Windows.Forms.TabPage();
@ -115,6 +120,8 @@ private void InitializeComponent()
this.txtPaste_eeUserAPIKey = new System.Windows.Forms.TextBox();
this.tpGist = new System.Windows.Forms.TabPage();
this.chkGistPublishPublic = new System.Windows.Forms.CheckBox();
this.oAuth2Gist = new UploadersLib.GUI.OAuth2Control();
this.atcGistAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpUpaste = new System.Windows.Forms.TabPage();
this.cbUpasteIsPublic = new System.Windows.Forms.CheckBox();
this.lblUpasteUserKey = new System.Windows.Forms.Label();
@ -122,6 +129,7 @@ private void InitializeComponent()
this.tpFileUploaders = new System.Windows.Forms.TabPage();
this.tcFileUploaders = new System.Windows.Forms.TabControl();
this.tpDropbox = new System.Windows.Forms.TabPage();
this.cbDropboxURLType = new System.Windows.Forms.ComboBox();
this.cbDropboxAutoCreateShareableLink = new System.Windows.Forms.CheckBox();
this.btnDropboxShowFiles = new System.Windows.Forms.Button();
this.btnDropboxCompleteAuth = new System.Windows.Forms.Button();
@ -133,18 +141,16 @@ private void InitializeComponent()
this.btnDropboxOpenAuthorize = new System.Windows.Forms.Button();
this.txtDropboxPath = new System.Windows.Forms.TextBox();
this.tpFTP = new System.Windows.Forms.TabPage();
this.tlpFtp = new System.Windows.Forms.TableLayoutPanel();
this.panelFtp = new System.Windows.Forms.Panel();
this.btnFtpClient = new System.Windows.Forms.Button();
this.btnFTPExport = new System.Windows.Forms.Button();
this.btnFTPImport = new System.Windows.Forms.Button();
this.gbFtpSettings = new System.Windows.Forms.GroupBox();
this.lblFtpFiles = new System.Windows.Forms.Label();
this.btnFTPImport = new System.Windows.Forms.Button();
this.lblFtpText = new System.Windows.Forms.Label();
this.ucFTPAccounts = new UploadersLib.AccountsControl();
this.lblFtpImages = new System.Windows.Forms.Label();
this.cboFtpImages = new System.Windows.Forms.ComboBox();
this.cboFtpFiles = new System.Windows.Forms.ComboBox();
this.cboFtpText = new System.Windows.Forms.ComboBox();
this.cboFtpImages = new System.Windows.Forms.ComboBox();
this.tpMega = new System.Windows.Forms.TabPage();
this.lblMegaStatus = new System.Windows.Forms.Label();
this.pnlMegaLogin = new System.Windows.Forms.Panel();
@ -181,6 +187,7 @@ private void InitializeComponent()
this.txtPushbulletUserKey = new System.Windows.Forms.TextBox();
this.tpGoogleDrive = new System.Windows.Forms.TabPage();
this.cbGoogleDriveIsPublic = new System.Windows.Forms.CheckBox();
this.oauth2GoogleDrive = new UploadersLib.GUI.OAuth2Control();
this.tpBox = new System.Windows.Forms.TabPage();
this.lblBoxFolderTip = new System.Windows.Forms.Label();
this.cbBoxShare = new System.Windows.Forms.CheckBox();
@ -188,6 +195,7 @@ private void InitializeComponent()
this.chBoxFoldersName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lblBoxFolderID = new System.Windows.Forms.Label();
this.btnBoxRefreshFolders = new System.Windows.Forms.Button();
this.oauth2Box = new UploadersLib.GUI.OAuth2Control();
this.tpRapidShare = new System.Windows.Forms.TabPage();
this.txtRapidShareFolderID = new System.Windows.Forms.TextBox();
this.lblRapidShareFolderID = new System.Windows.Forms.Label();
@ -203,6 +211,7 @@ private void InitializeComponent()
this.lblSendSpaceUsername = new System.Windows.Forms.Label();
this.txtSendSpacePassword = new System.Windows.Forms.TextBox();
this.txtSendSpaceUserName = new System.Windows.Forms.TextBox();
this.atcSendSpaceAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpGe_tt = new System.Windows.Forms.TabPage();
this.lblGe_ttAccessToken = new System.Windows.Forms.Label();
this.lblGe_ttPassword = new System.Windows.Forms.Label();
@ -240,6 +249,7 @@ private void InitializeComponent()
this.txtJiraConfigHelp = new System.Windows.Forms.TextBox();
this.txtJiraHost = new System.Windows.Forms.TextBox();
this.lblJiraHost = new System.Windows.Forms.Label();
this.oAuthJira = new UploadersLib.GUI.OAuth2Control();
this.tpEmail = new System.Windows.Forms.TabPage();
this.chkEmailConfirm = new System.Windows.Forms.CheckBox();
this.lblEmailSmtpServer = new System.Windows.Forms.Label();
@ -257,6 +267,7 @@ private void InitializeComponent()
this.txtEmailDefaultSubject = new System.Windows.Forms.TextBox();
this.tpSharedFolder = new System.Windows.Forms.TabPage();
this.tlpSharedFolders = new System.Windows.Forms.TableLayoutPanel();
this.ucLocalhostAccounts = new UploadersLib.AccountsControl();
this.gbSharedFolder = new System.Windows.Forms.GroupBox();
this.lblSharedFolderFiles = new System.Windows.Forms.Label();
this.lblSharedFolderText = new System.Windows.Forms.Label();
@ -267,7 +278,10 @@ private void InitializeComponent()
this.tpURLShorteners = new System.Windows.Forms.TabPage();
this.tcURLShorteners = new System.Windows.Forms.TabControl();
this.tpBitly = new System.Windows.Forms.TabPage();
this.oauth2Bitly = new UploadersLib.GUI.OAuth2Control();
this.tpGoogleURLShortener = new System.Windows.Forms.TabPage();
this.oauth2GoogleURLShortener = new UploadersLib.GUI.OAuth2Control();
this.atcGoogleURLShortenerAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpYourls = new System.Windows.Forms.TabPage();
this.txtYourlsPassword = new System.Windows.Forms.TextBox();
this.txtYourlsUsername = new System.Windows.Forms.TextBox();
@ -282,6 +296,7 @@ private void InitializeComponent()
this.tcSocialNetworkingServices = new System.Windows.Forms.TabControl();
this.tpTwitter = new System.Windows.Forms.TabPage();
this.btnTwitterLogin = new System.Windows.Forms.Button();
this.ucTwitterAccounts = new UploadersLib.AccountsControl();
this.tpCustomUploaders = new System.Windows.Forms.TabPage();
this.btnCustomUploaderHelp = new System.Windows.Forms.Button();
this.lblCustomUploaderImageUploader = new System.Windows.Forms.Label();
@ -340,24 +355,6 @@ private void InitializeComponent()
this.txtCustomUploaderArgName = new System.Windows.Forms.TextBox();
this.txtRapidSharePremiumUserName = new System.Windows.Forms.TextBox();
this.ttHelpTip = new System.Windows.Forms.ToolTip(this.components);
this.cbDropboxURLType = new System.Windows.Forms.ComboBox();
this.oauth2Imgur = new UploadersLib.GUI.OAuth2Control();
this.atcImgurAccountType = new UploadersLib.GUI.AccountTypeControl();
this.atcImageShackAccountType = new UploadersLib.GUI.AccountTypeControl();
this.atcTinyPicAccountType = new UploadersLib.GUI.AccountTypeControl();
this.oauth2Picasa = new UploadersLib.GUI.OAuth2Control();
this.oAuth2Gist = new UploadersLib.GUI.OAuth2Control();
this.atcGistAccountType = new UploadersLib.GUI.AccountTypeControl();
this.ucFTPAccounts = new UploadersLib.AccountsControl();
this.oauth2GoogleDrive = new UploadersLib.GUI.OAuth2Control();
this.oauth2Box = new UploadersLib.GUI.OAuth2Control();
this.atcSendSpaceAccountType = new UploadersLib.GUI.AccountTypeControl();
this.oAuthJira = new UploadersLib.GUI.OAuth2Control();
this.ucLocalhostAccounts = new UploadersLib.AccountsControl();
this.oauth2Bitly = new UploadersLib.GUI.OAuth2Control();
this.oauth2GoogleURLShortener = new UploadersLib.GUI.OAuth2Control();
this.atcGoogleURLShortenerAccountType = new UploadersLib.GUI.AccountTypeControl();
this.ucTwitterAccounts = new UploadersLib.AccountsControl();
this.actRapidShareAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tcUploaders.SuspendLayout();
this.tpImageUploaders.SuspendLayout();
@ -385,9 +382,6 @@ private void InitializeComponent()
this.tpDropbox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbDropboxLogo)).BeginInit();
this.tpFTP.SuspendLayout();
this.tlpFtp.SuspendLayout();
this.panelFtp.SuspendLayout();
this.gbFtpSettings.SuspendLayout();
this.tpMega.SuspendLayout();
this.pnlMegaLogin.SuspendLayout();
this.tpAmazonS3.SuspendLayout();
@ -485,6 +479,18 @@ private void InitializeComponent()
this.tpImgur.Text = "Imgur";
this.tpImgur.UseVisualStyleBackColor = true;
//
// oauth2Imgur
//
this.oauth2Imgur.Location = new System.Drawing.Point(16, 16);
this.oauth2Imgur.LoginStatus = false;
this.oauth2Imgur.Name = "oauth2Imgur";
this.oauth2Imgur.Size = new System.Drawing.Size(328, 207);
this.oauth2Imgur.Status = "Status: Login required.";
this.oauth2Imgur.TabIndex = 6;
this.oauth2Imgur.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked);
this.oauth2Imgur.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked);
this.oauth2Imgur.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked);
//
// txtImgurAlbumID
//
this.txtImgurAlbumID.Location = new System.Drawing.Point(592, 28);
@ -563,6 +569,15 @@ private void InitializeComponent()
this.lblImgurThumbnailType.TabIndex = 1;
this.lblImgurThumbnailType.Text = "Thumbnail type:";
//
// atcImgurAccountType
//
this.atcImgurAccountType.Location = new System.Drawing.Point(8, 232);
this.atcImgurAccountType.Name = "atcImgurAccountType";
this.atcImgurAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImgurAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImgurAccountType.TabIndex = 0;
this.atcImgurAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged);
//
// tpImageShack
//
this.tpImageShack.Controls.Add(this.atcImageShackAccountType);
@ -582,6 +597,15 @@ private void InitializeComponent()
this.tpImageShack.Text = "ImageShack";
this.tpImageShack.UseVisualStyleBackColor = true;
//
// atcImageShackAccountType
//
this.atcImageShackAccountType.Location = new System.Drawing.Point(8, 16);
this.atcImageShackAccountType.Name = "atcImageShackAccountType";
this.atcImageShackAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImageShackAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImageShackAccountType.TabIndex = 10;
this.atcImageShackAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImageShackAccountType_AccountTypeChanged);
//
// btnImageShackLogin
//
this.btnImageShackLogin.Location = new System.Drawing.Point(296, 82);
@ -675,6 +699,15 @@ private void InitializeComponent()
this.tpTinyPic.Text = "TinyPic";
this.tpTinyPic.UseVisualStyleBackColor = true;
//
// atcTinyPicAccountType
//
this.atcTinyPicAccountType.Location = new System.Drawing.Point(8, 16);
this.atcTinyPicAccountType.Name = "atcTinyPicAccountType";
this.atcTinyPicAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcTinyPicAccountType.Size = new System.Drawing.Size(272, 29);
this.atcTinyPicAccountType.TabIndex = 0;
this.atcTinyPicAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged);
//
// btnTinyPicLogin
//
this.btnTinyPicLogin.Location = new System.Drawing.Point(296, 82);
@ -1206,6 +1239,18 @@ private void InitializeComponent()
this.btnPicasaRefreshAlbumList.UseVisualStyleBackColor = true;
this.btnPicasaRefreshAlbumList.Click += new System.EventHandler(this.btnPicasaRefreshAlbumList_Click);
//
// oauth2Picasa
//
this.oauth2Picasa.Location = new System.Drawing.Point(16, 16);
this.oauth2Picasa.LoginStatus = false;
this.oauth2Picasa.Name = "oauth2Picasa";
this.oauth2Picasa.Size = new System.Drawing.Size(328, 207);
this.oauth2Picasa.Status = "Login required.";
this.oauth2Picasa.TabIndex = 0;
this.oauth2Picasa.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked);
this.oauth2Picasa.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked);
this.oauth2Picasa.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked);
//
// tpTextUploaders
//
this.tpTextUploaders.Controls.Add(this.tcTextUploaders);
@ -1313,6 +1358,28 @@ private void InitializeComponent()
this.chkGistPublishPublic.UseVisualStyleBackColor = true;
this.chkGistPublishPublic.CheckedChanged += new System.EventHandler(this.chkGistPublishPublic_CheckedChanged);
//
// oAuth2Gist
//
this.oAuth2Gist.Enabled = false;
this.oAuth2Gist.IsRefreshable = false;
this.oAuth2Gist.Location = new System.Drawing.Point(16, 51);
this.oAuth2Gist.LoginStatus = false;
this.oAuth2Gist.Name = "oAuth2Gist";
this.oAuth2Gist.Size = new System.Drawing.Size(328, 173);
this.oAuth2Gist.Status = "Status: Login required.";
this.oAuth2Gist.TabIndex = 16;
this.oAuth2Gist.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked);
this.oAuth2Gist.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked);
//
// atcGistAccountType
//
this.atcGistAccountType.Location = new System.Drawing.Point(15, 16);
this.atcGistAccountType.Name = "atcGistAccountType";
this.atcGistAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGistAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGistAccountType.TabIndex = 15;
this.atcGistAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged);
//
// tpUpaste
//
this.tpUpaste.Controls.Add(this.cbUpasteIsPublic);
@ -1411,6 +1478,16 @@ private void InitializeComponent()
this.tpDropbox.Text = "Dropbox";
this.tpDropbox.UseVisualStyleBackColor = true;
//
// cbDropboxURLType
//
this.cbDropboxURLType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbDropboxURLType.FormattingEnabled = true;
this.cbDropboxURLType.Location = new System.Drawing.Point(160, 174);
this.cbDropboxURLType.Name = "cbDropboxURLType";
this.cbDropboxURLType.Size = new System.Drawing.Size(121, 21);
this.cbDropboxURLType.TabIndex = 20;
this.cbDropboxURLType.SelectedIndexChanged += new System.EventHandler(this.cbDropboxURLType_SelectedIndexChanged);
//
// cbDropboxAutoCreateShareableLink
//
this.cbDropboxAutoCreateShareableLink.AutoSize = true;
@ -1514,7 +1591,16 @@ private void InitializeComponent()
//
// tpFTP
//
this.tpFTP.Controls.Add(this.tlpFtp);
this.tpFTP.Controls.Add(this.btnFtpClient);
this.tpFTP.Controls.Add(this.btnFTPExport);
this.tpFTP.Controls.Add(this.lblFtpFiles);
this.tpFTP.Controls.Add(this.btnFTPImport);
this.tpFTP.Controls.Add(this.lblFtpText);
this.tpFTP.Controls.Add(this.ucFTPAccounts);
this.tpFTP.Controls.Add(this.lblFtpImages);
this.tpFTP.Controls.Add(this.cboFtpImages);
this.tpFTP.Controls.Add(this.cboFtpFiles);
this.tpFTP.Controls.Add(this.cboFtpText);
this.tpFTP.Location = new System.Drawing.Point(4, 40);
this.tpFTP.Name = "tpFTP";
this.tpFTP.Padding = new System.Windows.Forms.Padding(3);
@ -1523,36 +1609,10 @@ private void InitializeComponent()
this.tpFTP.Text = "FTP";
this.tpFTP.UseVisualStyleBackColor = true;
//
// tlpFtp
//
this.tlpFtp.ColumnCount = 1;
this.tlpFtp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpFtp.Controls.Add(this.panelFtp, 0, 0);
this.tlpFtp.Controls.Add(this.gbFtpSettings, 0, 1);
this.tlpFtp.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpFtp.Location = new System.Drawing.Point(3, 3);
this.tlpFtp.Name = "tlpFtp";
this.tlpFtp.RowCount = 2;
this.tlpFtp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.tlpFtp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tlpFtp.Size = new System.Drawing.Size(798, 469);
this.tlpFtp.TabIndex = 0;
//
// panelFtp
//
this.panelFtp.Controls.Add(this.btnFtpClient);
this.panelFtp.Controls.Add(this.btnFTPExport);
this.panelFtp.Controls.Add(this.btnFTPImport);
this.panelFtp.Controls.Add(this.ucFTPAccounts);
this.panelFtp.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelFtp.Location = new System.Drawing.Point(3, 3);
this.panelFtp.Name = "panelFtp";
this.panelFtp.Size = new System.Drawing.Size(792, 345);
this.panelFtp.TabIndex = 0;
//
// btnFtpClient
//
this.btnFtpClient.Location = new System.Drawing.Point(448, 7);
this.btnFtpClient.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFtpClient.Location = new System.Drawing.Point(456, 48);
this.btnFtpClient.Name = "btnFtpClient";
this.btnFtpClient.Size = new System.Drawing.Size(64, 24);
this.btnFtpClient.TabIndex = 2;
@ -1563,81 +1623,82 @@ private void InitializeComponent()
// btnFTPExport
//
this.btnFTPExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFTPExport.AutoSize = true;
this.btnFTPExport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnFTPExport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnFTPExport.Location = new System.Drawing.Point(650, 8);
this.btnFTPExport.Location = new System.Drawing.Point(664, 48);
this.btnFTPExport.Name = "btnFTPExport";
this.btnFTPExport.Size = new System.Drawing.Size(127, 23);
this.btnFTPExport.Size = new System.Drawing.Size(128, 24);
this.btnFTPExport.TabIndex = 4;
this.btnFTPExport.Text = "Export FTP Accounts...";
this.btnFTPExport.Text = "Export FTP accounts...";
this.btnFTPExport.UseVisualStyleBackColor = true;
this.btnFTPExport.Click += new System.EventHandler(this.btnFTPExport_Click);
//
// btnFTPImport
//
this.btnFTPImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFTPImport.AutoSize = true;
this.btnFTPImport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnFTPImport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnFTPImport.Location = new System.Drawing.Point(518, 8);
this.btnFTPImport.Name = "btnFTPImport";
this.btnFTPImport.Size = new System.Drawing.Size(126, 23);
this.btnFTPImport.TabIndex = 3;
this.btnFTPImport.Text = "Import FTP Accounts...";
this.btnFTPImport.UseVisualStyleBackColor = true;
this.btnFTPImport.Click += new System.EventHandler(this.btnFTPImport_Click);
//
// gbFtpSettings
//
this.gbFtpSettings.Controls.Add(this.lblFtpFiles);
this.gbFtpSettings.Controls.Add(this.lblFtpText);
this.gbFtpSettings.Controls.Add(this.lblFtpImages);
this.gbFtpSettings.Controls.Add(this.cboFtpFiles);
this.gbFtpSettings.Controls.Add(this.cboFtpText);
this.gbFtpSettings.Controls.Add(this.cboFtpImages);
this.gbFtpSettings.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbFtpSettings.Location = new System.Drawing.Point(3, 354);
this.gbFtpSettings.Name = "gbFtpSettings";
this.gbFtpSettings.Size = new System.Drawing.Size(792, 112);
this.gbFtpSettings.TabIndex = 1;
this.gbFtpSettings.TabStop = false;
this.gbFtpSettings.Text = "FTP Settings";
//
// lblFtpFiles
//
this.lblFtpFiles.AutoSize = true;
this.lblFtpFiles.Location = new System.Drawing.Point(29, 75);
this.lblFtpFiles.Location = new System.Drawing.Point(544, 16);
this.lblFtpFiles.Name = "lblFtpFiles";
this.lblFtpFiles.Size = new System.Drawing.Size(28, 13);
this.lblFtpFiles.Size = new System.Drawing.Size(26, 13);
this.lblFtpFiles.TabIndex = 4;
this.lblFtpFiles.Text = "Files";
this.lblFtpFiles.Text = "File:";
//
// btnFTPImport
//
this.btnFTPImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFTPImport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnFTPImport.Location = new System.Drawing.Point(528, 48);
this.btnFTPImport.Name = "btnFTPImport";
this.btnFTPImport.Size = new System.Drawing.Size(128, 24);
this.btnFTPImport.TabIndex = 3;
this.btnFTPImport.Text = "Import FTP accounts...";
this.btnFTPImport.UseVisualStyleBackColor = true;
this.btnFTPImport.Click += new System.EventHandler(this.btnFTPImport_Click);
//
// lblFtpText
//
this.lblFtpText.AutoSize = true;
this.lblFtpText.Location = new System.Drawing.Point(29, 49);
this.lblFtpText.Location = new System.Drawing.Point(285, 16);
this.lblFtpText.Name = "lblFtpText";
this.lblFtpText.Size = new System.Drawing.Size(28, 13);
this.lblFtpText.Size = new System.Drawing.Size(31, 13);
this.lblFtpText.TabIndex = 2;
this.lblFtpText.Text = "Text";
this.lblFtpText.Text = "Text:";
//
// ucFTPAccounts
//
this.ucFTPAccounts.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucFTPAccounts.Location = new System.Drawing.Point(8, 40);
this.ucFTPAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucFTPAccounts.Name = "ucFTPAccounts";
this.ucFTPAccounts.Size = new System.Drawing.Size(792, 416);
this.ucFTPAccounts.TabIndex = 0;
//
// lblFtpImages
//
this.lblFtpImages.AutoSize = true;
this.lblFtpImages.Location = new System.Drawing.Point(16, 24);
this.lblFtpImages.Location = new System.Drawing.Point(16, 16);
this.lblFtpImages.Name = "lblFtpImages";
this.lblFtpImages.Size = new System.Drawing.Size(41, 13);
this.lblFtpImages.Size = new System.Drawing.Size(39, 13);
this.lblFtpImages.TabIndex = 0;
this.lblFtpImages.Text = "Images";
this.lblFtpImages.Text = "Image:";
//
// cboFtpImages
//
this.cboFtpImages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboFtpImages.FormattingEnabled = true;
this.cboFtpImages.Location = new System.Drawing.Point(56, 12);
this.cboFtpImages.Name = "cboFtpImages";
this.cboFtpImages.Size = new System.Drawing.Size(216, 21);
this.cboFtpImages.TabIndex = 1;
this.cboFtpImages.SelectedIndexChanged += new System.EventHandler(this.cboFtpImages_SelectedIndexChanged);
//
// cboFtpFiles
//
this.cboFtpFiles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboFtpFiles.FormattingEnabled = true;
this.cboFtpFiles.Location = new System.Drawing.Point(69, 69);
this.cboFtpFiles.Location = new System.Drawing.Point(576, 12);
this.cboFtpFiles.Name = "cboFtpFiles";
this.cboFtpFiles.Size = new System.Drawing.Size(272, 21);
this.cboFtpFiles.Size = new System.Drawing.Size(216, 21);
this.cboFtpFiles.TabIndex = 5;
this.cboFtpFiles.SelectedIndexChanged += new System.EventHandler(this.cboFtpFiles_SelectedIndexChanged);
//
@ -1645,22 +1706,12 @@ private void InitializeComponent()
//
this.cboFtpText.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboFtpText.FormattingEnabled = true;
this.cboFtpText.Location = new System.Drawing.Point(69, 45);
this.cboFtpText.Location = new System.Drawing.Point(317, 12);
this.cboFtpText.Name = "cboFtpText";
this.cboFtpText.Size = new System.Drawing.Size(272, 21);
this.cboFtpText.Size = new System.Drawing.Size(216, 21);
this.cboFtpText.TabIndex = 3;
this.cboFtpText.SelectedIndexChanged += new System.EventHandler(this.cboFtpText_SelectedIndexChanged);
//
// cboFtpImages
//
this.cboFtpImages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboFtpImages.FormattingEnabled = true;
this.cboFtpImages.Location = new System.Drawing.Point(69, 21);
this.cboFtpImages.Name = "cboFtpImages";
this.cboFtpImages.Size = new System.Drawing.Size(272, 21);
this.cboFtpImages.TabIndex = 1;
this.cboFtpImages.SelectedIndexChanged += new System.EventHandler(this.cboFtpImages_SelectedIndexChanged);
//
// tpMega
//
this.tpMega.Controls.Add(this.lblMegaStatus);
@ -2046,6 +2097,18 @@ private void InitializeComponent()
this.cbGoogleDriveIsPublic.UseVisualStyleBackColor = true;
this.cbGoogleDriveIsPublic.CheckedChanged += new System.EventHandler(this.cbGoogleDriveIsPublic_CheckedChanged);
//
// oauth2GoogleDrive
//
this.oauth2GoogleDrive.Location = new System.Drawing.Point(16, 16);
this.oauth2GoogleDrive.LoginStatus = false;
this.oauth2GoogleDrive.Name = "oauth2GoogleDrive";
this.oauth2GoogleDrive.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleDrive.Status = "Status: Login required.";
this.oauth2GoogleDrive.TabIndex = 0;
this.oauth2GoogleDrive.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked);
this.oauth2GoogleDrive.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked);
this.oauth2GoogleDrive.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked);
//
// tpBox
//
this.tpBox.Controls.Add(this.lblBoxFolderTip);
@ -2122,6 +2185,18 @@ private void InitializeComponent()
this.btnBoxRefreshFolders.UseVisualStyleBackColor = true;
this.btnBoxRefreshFolders.Click += new System.EventHandler(this.btnBoxRefreshFolders_Click);
//
// oauth2Box
//
this.oauth2Box.Location = new System.Drawing.Point(16, 16);
this.oauth2Box.LoginStatus = false;
this.oauth2Box.Name = "oauth2Box";
this.oauth2Box.Size = new System.Drawing.Size(328, 207);
this.oauth2Box.Status = "Status: Login required.";
this.oauth2Box.TabIndex = 7;
this.oauth2Box.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Box_OpenButtonClicked);
this.oauth2Box.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Box_CompleteButtonClicked);
this.oauth2Box.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Box_RefreshButtonClicked);
//
// tpRapidShare
//
this.tpRapidShare.Controls.Add(this.txtRapidShareFolderID);
@ -2271,6 +2346,15 @@ private void InitializeComponent()
this.txtSendSpaceUserName.TabIndex = 3;
this.txtSendSpaceUserName.TextChanged += new System.EventHandler(this.txtSendSpaceUserName_TextChanged);
//
// atcSendSpaceAccountType
//
this.atcSendSpaceAccountType.Location = new System.Drawing.Point(8, 16);
this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType";
this.atcSendSpaceAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcSendSpaceAccountType.Size = new System.Drawing.Size(214, 29);
this.atcSendSpaceAccountType.TabIndex = 0;
this.atcSendSpaceAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged);
//
// tpGe_tt
//
this.tpGe_tt.Controls.Add(this.lblGe_ttAccessToken);
@ -2649,6 +2733,18 @@ private void InitializeComponent()
this.lblJiraHost.TabIndex = 0;
this.lblJiraHost.Text = "Jira host: ";
//
// oAuthJira
//
this.oAuthJira.Location = new System.Drawing.Point(473, 13);
this.oAuthJira.LoginStatus = false;
this.oAuthJira.Name = "oAuthJira";
this.oAuthJira.Size = new System.Drawing.Size(328, 207);
this.oAuthJira.Status = "Status: Login required.";
this.oAuthJira.TabIndex = 1;
this.oAuthJira.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked);
this.oAuthJira.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked);
this.oAuthJira.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// tpEmail
//
this.tpEmail.Controls.Add(this.chkEmailConfirm);
@ -2841,6 +2937,15 @@ private void InitializeComponent()
this.tlpSharedFolders.Size = new System.Drawing.Size(798, 451);
this.tlpSharedFolders.TabIndex = 0;
//
// ucLocalhostAccounts
//
this.ucLocalhostAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucLocalhostAccounts.Location = new System.Drawing.Point(4, 4);
this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucLocalhostAccounts.Name = "ucLocalhostAccounts";
this.ucLocalhostAccounts.Size = new System.Drawing.Size(790, 330);
this.ucLocalhostAccounts.TabIndex = 0;
//
// gbSharedFolder
//
this.gbSharedFolder.Controls.Add(this.lblSharedFolderFiles);
@ -2948,6 +3053,18 @@ private void InitializeComponent()
this.tpBitly.Text = "bit.ly";
this.tpBitly.UseVisualStyleBackColor = true;
//
// oauth2Bitly
//
this.oauth2Bitly.IsRefreshable = false;
this.oauth2Bitly.Location = new System.Drawing.Point(16, 16);
this.oauth2Bitly.LoginStatus = false;
this.oauth2Bitly.Name = "oauth2Bitly";
this.oauth2Bitly.Size = new System.Drawing.Size(328, 168);
this.oauth2Bitly.Status = "Login required.";
this.oauth2Bitly.TabIndex = 0;
this.oauth2Bitly.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked);
this.oauth2Bitly.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked);
//
// tpGoogleURLShortener
//
this.tpGoogleURLShortener.Controls.Add(this.oauth2GoogleURLShortener);
@ -2960,6 +3077,27 @@ private void InitializeComponent()
this.tpGoogleURLShortener.Text = "Google";
this.tpGoogleURLShortener.UseVisualStyleBackColor = true;
//
// oauth2GoogleURLShortener
//
this.oauth2GoogleURLShortener.Location = new System.Drawing.Point(16, 56);
this.oauth2GoogleURLShortener.LoginStatus = false;
this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener";
this.oauth2GoogleURLShortener.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleURLShortener.Status = "Status: Login required.";
this.oauth2GoogleURLShortener.TabIndex = 1;
this.oauth2GoogleURLShortener.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked);
this.oauth2GoogleURLShortener.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
//
// atcGoogleURLShortenerAccountType
//
this.atcGoogleURLShortenerAccountType.Location = new System.Drawing.Point(8, 16);
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGoogleURLShortenerAccountType.TabIndex = 0;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
//
// tpYourls
//
this.tpYourls.Controls.Add(this.txtYourlsPassword);
@ -3084,7 +3222,6 @@ private void InitializeComponent()
this.tpTwitter.Controls.Add(this.ucTwitterAccounts);
this.tpTwitter.Location = new System.Drawing.Point(4, 22);
this.tpTwitter.Name = "tpTwitter";
this.tpTwitter.Padding = new System.Windows.Forms.Padding(3);
this.tpTwitter.Size = new System.Drawing.Size(804, 475);
this.tpTwitter.TabIndex = 0;
this.tpTwitter.Text = "Twitter";
@ -3092,14 +3229,23 @@ private void InitializeComponent()
//
// btnTwitterLogin
//
this.btnTwitterLogin.Location = new System.Drawing.Point(224, 11);
this.btnTwitterLogin.Location = new System.Drawing.Point(296, 8);
this.btnTwitterLogin.Name = "btnTwitterLogin";
this.btnTwitterLogin.Size = new System.Drawing.Size(60, 24);
this.btnTwitterLogin.Size = new System.Drawing.Size(64, 24);
this.btnTwitterLogin.TabIndex = 1;
this.btnTwitterLogin.Text = "Login";
this.btnTwitterLogin.UseVisualStyleBackColor = true;
this.btnTwitterLogin.Click += new System.EventHandler(this.btnTwitterLogin_Click);
//
// ucTwitterAccounts
//
this.ucTwitterAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucTwitterAccounts.Location = new System.Drawing.Point(0, 0);
this.ucTwitterAccounts.Margin = new System.Windows.Forms.Padding(0);
this.ucTwitterAccounts.Name = "ucTwitterAccounts";
this.ucTwitterAccounts.Size = new System.Drawing.Size(804, 475);
this.ucTwitterAccounts.TabIndex = 0;
//
// tpCustomUploaders
//
this.tpCustomUploaders.Controls.Add(this.btnCustomUploaderHelp);
@ -3691,193 +3837,6 @@ private void InitializeComponent()
this.ttHelpTip.UseAnimation = false;
this.ttHelpTip.UseFading = false;
//
// cbDropboxURLType
//
this.cbDropboxURLType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbDropboxURLType.FormattingEnabled = true;
this.cbDropboxURLType.Location = new System.Drawing.Point(160, 174);
this.cbDropboxURLType.Name = "cbDropboxURLType";
this.cbDropboxURLType.Size = new System.Drawing.Size(121, 21);
this.cbDropboxURLType.TabIndex = 20;
this.cbDropboxURLType.SelectedIndexChanged += new System.EventHandler(this.cbDropboxURLType_SelectedIndexChanged);
//
// oauth2Imgur
//
this.oauth2Imgur.Location = new System.Drawing.Point(16, 16);
this.oauth2Imgur.LoginStatus = false;
this.oauth2Imgur.Name = "oauth2Imgur";
this.oauth2Imgur.Size = new System.Drawing.Size(328, 207);
this.oauth2Imgur.Status = "Status: Login required.";
this.oauth2Imgur.TabIndex = 6;
this.oauth2Imgur.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked);
this.oauth2Imgur.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked);
this.oauth2Imgur.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked);
//
// atcImgurAccountType
//
this.atcImgurAccountType.Location = new System.Drawing.Point(8, 232);
this.atcImgurAccountType.Name = "atcImgurAccountType";
this.atcImgurAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImgurAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImgurAccountType.TabIndex = 0;
this.atcImgurAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged);
//
// atcImageShackAccountType
//
this.atcImageShackAccountType.Location = new System.Drawing.Point(8, 16);
this.atcImageShackAccountType.Name = "atcImageShackAccountType";
this.atcImageShackAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImageShackAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImageShackAccountType.TabIndex = 10;
this.atcImageShackAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImageShackAccountType_AccountTypeChanged);
//
// atcTinyPicAccountType
//
this.atcTinyPicAccountType.Location = new System.Drawing.Point(8, 16);
this.atcTinyPicAccountType.Name = "atcTinyPicAccountType";
this.atcTinyPicAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcTinyPicAccountType.Size = new System.Drawing.Size(272, 29);
this.atcTinyPicAccountType.TabIndex = 0;
this.atcTinyPicAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged);
//
// oauth2Picasa
//
this.oauth2Picasa.Location = new System.Drawing.Point(16, 16);
this.oauth2Picasa.LoginStatus = false;
this.oauth2Picasa.Name = "oauth2Picasa";
this.oauth2Picasa.Size = new System.Drawing.Size(328, 207);
this.oauth2Picasa.Status = "Login required.";
this.oauth2Picasa.TabIndex = 0;
this.oauth2Picasa.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked);
this.oauth2Picasa.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked);
this.oauth2Picasa.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked);
//
// oAuth2Gist
//
this.oAuth2Gist.Enabled = false;
this.oAuth2Gist.IsRefreshable = false;
this.oAuth2Gist.Location = new System.Drawing.Point(16, 51);
this.oAuth2Gist.LoginStatus = false;
this.oAuth2Gist.Name = "oAuth2Gist";
this.oAuth2Gist.Size = new System.Drawing.Size(328, 173);
this.oAuth2Gist.Status = "Status: Login required.";
this.oAuth2Gist.TabIndex = 16;
this.oAuth2Gist.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked);
this.oAuth2Gist.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked);
//
// atcGistAccountType
//
this.atcGistAccountType.Location = new System.Drawing.Point(15, 16);
this.atcGistAccountType.Name = "atcGistAccountType";
this.atcGistAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGistAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGistAccountType.TabIndex = 15;
this.atcGistAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged);
//
// ucFTPAccounts
//
this.ucFTPAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucFTPAccounts.Location = new System.Drawing.Point(0, 0);
this.ucFTPAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucFTPAccounts.Name = "ucFTPAccounts";
this.ucFTPAccounts.Size = new System.Drawing.Size(792, 345);
this.ucFTPAccounts.TabIndex = 0;
//
// oauth2GoogleDrive
//
this.oauth2GoogleDrive.Location = new System.Drawing.Point(16, 16);
this.oauth2GoogleDrive.LoginStatus = false;
this.oauth2GoogleDrive.Name = "oauth2GoogleDrive";
this.oauth2GoogleDrive.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleDrive.Status = "Status: Login required.";
this.oauth2GoogleDrive.TabIndex = 0;
this.oauth2GoogleDrive.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked);
this.oauth2GoogleDrive.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked);
this.oauth2GoogleDrive.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked);
//
// oauth2Box
//
this.oauth2Box.Location = new System.Drawing.Point(16, 16);
this.oauth2Box.LoginStatus = false;
this.oauth2Box.Name = "oauth2Box";
this.oauth2Box.Size = new System.Drawing.Size(328, 207);
this.oauth2Box.Status = "Status: Login required.";
this.oauth2Box.TabIndex = 7;
this.oauth2Box.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Box_OpenButtonClicked);
this.oauth2Box.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Box_CompleteButtonClicked);
this.oauth2Box.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Box_RefreshButtonClicked);
//
// atcSendSpaceAccountType
//
this.atcSendSpaceAccountType.Location = new System.Drawing.Point(8, 16);
this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType";
this.atcSendSpaceAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcSendSpaceAccountType.Size = new System.Drawing.Size(214, 29);
this.atcSendSpaceAccountType.TabIndex = 0;
this.atcSendSpaceAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged);
//
// oAuthJira
//
this.oAuthJira.Location = new System.Drawing.Point(473, 13);
this.oAuthJira.LoginStatus = false;
this.oAuthJira.Name = "oAuthJira";
this.oAuthJira.Size = new System.Drawing.Size(328, 207);
this.oAuthJira.Status = "Status: Login required.";
this.oAuthJira.TabIndex = 1;
this.oAuthJira.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked);
this.oAuthJira.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked);
this.oAuthJira.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// ucLocalhostAccounts
//
this.ucLocalhostAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucLocalhostAccounts.Location = new System.Drawing.Point(4, 4);
this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucLocalhostAccounts.Name = "ucLocalhostAccounts";
this.ucLocalhostAccounts.Size = new System.Drawing.Size(790, 330);
this.ucLocalhostAccounts.TabIndex = 0;
//
// oauth2Bitly
//
this.oauth2Bitly.IsRefreshable = false;
this.oauth2Bitly.Location = new System.Drawing.Point(16, 16);
this.oauth2Bitly.LoginStatus = false;
this.oauth2Bitly.Name = "oauth2Bitly";
this.oauth2Bitly.Size = new System.Drawing.Size(328, 168);
this.oauth2Bitly.Status = "Login required.";
this.oauth2Bitly.TabIndex = 0;
this.oauth2Bitly.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked);
this.oauth2Bitly.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked);
//
// oauth2GoogleURLShortener
//
this.oauth2GoogleURLShortener.Location = new System.Drawing.Point(16, 56);
this.oauth2GoogleURLShortener.LoginStatus = false;
this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener";
this.oauth2GoogleURLShortener.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleURLShortener.Status = "Status: Login required.";
this.oauth2GoogleURLShortener.TabIndex = 1;
this.oauth2GoogleURLShortener.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked);
this.oauth2GoogleURLShortener.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
//
// atcGoogleURLShortenerAccountType
//
this.atcGoogleURLShortenerAccountType.Location = new System.Drawing.Point(8, 16);
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGoogleURLShortenerAccountType.TabIndex = 0;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
//
// ucTwitterAccounts
//
this.ucTwitterAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucTwitterAccounts.Location = new System.Drawing.Point(3, 3);
this.ucTwitterAccounts.Name = "ucTwitterAccounts";
this.ucTwitterAccounts.Size = new System.Drawing.Size(798, 469);
this.ucTwitterAccounts.TabIndex = 0;
//
// actRapidShareAccountType
//
this.actRapidShareAccountType.Location = new System.Drawing.Point(8, 16);
@ -3941,11 +3900,7 @@ private void InitializeComponent()
this.tpDropbox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbDropboxLogo)).EndInit();
this.tpFTP.ResumeLayout(false);
this.tlpFtp.ResumeLayout(false);
this.panelFtp.ResumeLayout(false);
this.panelFtp.PerformLayout();
this.gbFtpSettings.ResumeLayout(false);
this.gbFtpSettings.PerformLayout();
this.tpFTP.PerformLayout();
this.tpMega.ResumeLayout(false);
this.tpMega.PerformLayout();
this.pnlMegaLogin.ResumeLayout(false);
@ -4047,15 +4002,12 @@ private void InitializeComponent()
private System.Windows.Forms.Label lblDropboxPath;
private System.Windows.Forms.Button btnDropboxOpenAuthorize;
private System.Windows.Forms.TextBox txtDropboxPath;
private System.Windows.Forms.TableLayoutPanel tlpFtp;
private System.Windows.Forms.GroupBox gbFtpSettings;
private System.Windows.Forms.Label lblFtpFiles;
private System.Windows.Forms.Label lblFtpText;
private System.Windows.Forms.Label lblFtpImages;
private System.Windows.Forms.ComboBox cboFtpFiles;
private System.Windows.Forms.ComboBox cboFtpText;
private System.Windows.Forms.ComboBox cboFtpImages;
private System.Windows.Forms.Panel panelFtp;
private AccountsControl ucFTPAccounts;
internal System.Windows.Forms.Button btnFTPExport;
internal System.Windows.Forms.Button btnFTPImport;

View file

@ -323,9 +323,9 @@ public void LoadSettings(UploadersConfig uploadersConfig)
else
{
FTPSetup(Config.FTPAccountList);
if (ucFTPAccounts.AccountsList.Items.Count > 0)
if (ucFTPAccounts.lbAccounts.Items.Count > 0)
{
ucFTPAccounts.AccountsList.SelectedIndex = 0;
ucFTPAccounts.lbAccounts.SelectedIndex = 0;
}
}
@ -361,12 +361,12 @@ public void LoadSettings(UploadersConfig uploadersConfig)
else
{
LocalhostAccountsSetup(Config.LocalhostAccountList);
if (ucLocalhostAccounts.AccountsList.Items.Count > 0)
if (ucLocalhostAccounts.lbAccounts.Items.Count > 0)
{
ucLocalhostAccounts.AccountsList.SelectedIndex = 0;
cboSharedFolderImages.SelectedIndex = Config.LocalhostSelectedImages.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
cboSharedFolderText.SelectedIndex = Config.LocalhostSelectedText.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
cboSharedFolderFiles.SelectedIndex = Config.LocalhostSelectedFiles.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
ucLocalhostAccounts.lbAccounts.SelectedIndex = 0;
cboSharedFolderImages.SelectedIndex = Config.LocalhostSelectedImages.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
cboSharedFolderText.SelectedIndex = Config.LocalhostSelectedText.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
cboSharedFolderFiles.SelectedIndex = Config.LocalhostSelectedFiles.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
}
}
@ -468,16 +468,16 @@ public void LoadSettings(UploadersConfig uploadersConfig)
#region Other Services
ucTwitterAccounts.AccountsList.Items.Clear();
ucTwitterAccounts.lbAccounts.Items.Clear();
foreach (OAuthInfo acc in Config.TwitterOAuthInfoList)
{
ucTwitterAccounts.AccountsList.Items.Add(acc);
ucTwitterAccounts.lbAccounts.Items.Add(acc);
}
if (ucTwitterAccounts.AccountsList.Items.Count > 0)
if (ucTwitterAccounts.lbAccounts.Items.Count > 0)
{
ucTwitterAccounts.AccountsList.SelectedIndex = Config.TwitterSelectedAccount;
ucTwitterAccounts.lbAccounts.SelectedIndex = Config.TwitterSelectedAccount;
}
#endregion Other Services
@ -486,113 +486,37 @@ public void LoadSettings(UploadersConfig uploadersConfig)
private void CreateUserControlEvents()
{
// FTP
ucFTPAccounts.btnAdd.Click += FTPAccountAddButton_Click;
ucFTPAccounts.btnRemove.Click += FTPAccountRemoveButton_Click;
ucFTPAccounts.btnDuplicate.Click += FTPAccountDuplicateButton_Click;
ucFTPAccounts.btnTest.Click += FTPAccountTestButton_Click;
ucFTPAccounts.btnClone.Visible = true;
ucFTPAccounts.btnClone.Click += FTPAccountCloneButton_Click;
ucFTPAccounts.AccountsList.SelectedIndexChanged += FTPAccountsList_SelectedIndexChanged;
ucFTPAccounts.SettingsGrid.PropertyValueChanged += FtpAccountSettingsGrid_PropertyValueChanged;
ucFTPAccounts.pgSettings.PropertyValueChanged += FtpAccountSettingsGrid_PropertyValueChanged;
// Localhost
ucLocalhostAccounts.btnAdd.Click += LocalhostAccountAddButton_Click;
ucLocalhostAccounts.btnRemove.Click += LocalhostAccountRemoveButton_Click;
ucLocalhostAccounts.btnDuplicate.Click += LocalhostAccountDuplicateButton_Click;
ucLocalhostAccounts.btnTest.Visible = false;
ucLocalhostAccounts.AccountsList.SelectedIndexChanged += LocalhostAccountsList_SelectedIndexChanged;
ucLocalhostAccounts.SettingsGrid.PropertyValueChanged += SettingsGrid_LocalhostPropertyValueChanged;
ucLocalhostAccounts.pgSettings.PropertyValueChanged += SettingsGrid_LocalhostPropertyValueChanged;
// Twitter
ucTwitterAccounts.btnAdd.Text = "Add";
ucTwitterAccounts.btnAdd.Click += TwitterAccountAddButton_Click;
ucTwitterAccounts.btnRemove.Click += TwitterAccountRemoveButton_Click;
ucTwitterAccounts.btnDuplicate.Click += TwitterAccountDuplicateButton_Click;
ucTwitterAccounts.btnTest.Text = "Authorize";
ucTwitterAccounts.btnTest.Click += TwitterAccountAuthButton_Click;
ucTwitterAccounts.SettingsGrid.PropertySort = PropertySort.NoSort;
ucTwitterAccounts.AccountsList.SelectedIndexChanged += TwitterAccountList_SelectedIndexChanged;
}
#region Localhost
private void LocalhostAccountAddButton_Click(object sender, EventArgs e)
{
LocalhostAccount acc = new LocalhostAccount("New Account");
Config.LocalhostAccountList.Add(acc);
ucLocalhostAccounts.AccountsList.Items.Add(acc);
ucLocalhostAccounts.AccountsList.SelectedIndex = ucLocalhostAccounts.AccountsList.Items.Count - 1;
}
private void LocalhostAccountRemoveButton_Click(object sender, EventArgs e)
{
int sel = ucLocalhostAccounts.AccountsList.SelectedIndex;
if (ucLocalhostAccounts.RemoveItem(sel))
{
Config.LocalhostAccountList.RemoveAt(sel);
}
}
private void LocalhostAccountsList_SelectedIndexChanged(object sender, EventArgs e)
{
int sel = ucLocalhostAccounts.AccountsList.SelectedIndex;
if (Config.LocalhostAccountList.IsValidIndex(sel))
{
LocalhostAccount acc = Config.LocalhostAccountList[sel];
ucLocalhostAccounts.SettingsGrid.SelectedObject = acc;
}
}
private void SettingsGrid_LocalhostPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
LocalhostAccountsSetup(Config.LocalhostAccountList);
}
private void LocalhostAccountsSetup(IEnumerable<LocalhostAccount> accs)
{
if (accs != null)
{
int sel = ucLocalhostAccounts.AccountsList.SelectedIndex;
ucLocalhostAccounts.AccountsList.Items.Clear();
Config.LocalhostAccountList = new List<LocalhostAccount>();
Config.LocalhostAccountList.AddRange(accs);
cboSharedFolderFiles.Items.Clear();
cboSharedFolderImages.Items.Clear();
cboSharedFolderText.Items.Clear();
foreach (LocalhostAccount acc in Config.LocalhostAccountList)
{
ucLocalhostAccounts.AccountsList.Items.Add(acc);
cboSharedFolderFiles.Items.Add(acc);
cboSharedFolderImages.Items.Add(acc);
cboSharedFolderText.Items.Add(acc);
}
if (ucLocalhostAccounts.AccountsList.Items.Count > 0)
{
ucLocalhostAccounts.AccountsList.SelectedIndex = sel.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
cboSharedFolderFiles.SelectedIndex = Config.LocalhostSelectedFiles.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
cboSharedFolderImages.SelectedIndex = Config.LocalhostSelectedImages.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
cboSharedFolderText.SelectedIndex = Config.LocalhostSelectedText.Between(0, ucLocalhostAccounts.AccountsList.Items.Count - 1);
}
}
}
#endregion Localhost
#region FTP
private void FTPSetup(IEnumerable<FTPAccount> accs)
{
if (accs != null)
{
int selFtpList = ucFTPAccounts.AccountsList.SelectedIndex;
int selFtpList = ucFTPAccounts.lbAccounts.SelectedIndex;
ucFTPAccounts.AccountsList.Items.Clear();
ucFTPAccounts.SettingsGrid.PropertySort = PropertySort.Categorized;
ucFTPAccounts.lbAccounts.Items.Clear();
ucFTPAccounts.pgSettings.PropertySort = PropertySort.Categorized;
cboFtpImages.Items.Clear();
cboFtpText.Items.Clear();
cboFtpFiles.Items.Clear();
@ -602,34 +526,33 @@ private void FTPSetup(IEnumerable<FTPAccount> accs)
foreach (FTPAccount acc in Config.FTPAccountList)
{
ucFTPAccounts.AccountsList.Items.Add(acc);
ucFTPAccounts.lbAccounts.Items.Add(acc);
cboFtpImages.Items.Add(acc);
cboFtpText.Items.Add(acc);
cboFtpFiles.Items.Add(acc);
}
if (ucFTPAccounts.AccountsList.Items.Count > 0)
if (ucFTPAccounts.lbAccounts.Items.Count > 0)
{
ucFTPAccounts.AccountsList.SelectedIndex = selFtpList.Between(0, ucFTPAccounts.AccountsList.Items.Count - 1);
cboFtpImages.SelectedIndex = Config.FTPSelectedImage.Between(0, ucFTPAccounts.AccountsList.Items.Count - 1);
cboFtpText.SelectedIndex = Config.FTPSelectedText.Between(0, ucFTPAccounts.AccountsList.Items.Count - 1);
cboFtpFiles.SelectedIndex = Config.FTPSelectedFile.Between(0, ucFTPAccounts.AccountsList.Items.Count - 1);
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)
{
FTPAccount acc = new FTPAccount("New Account");
FTPAccount acc = new FTPAccount("New account");
Config.FTPAccountList.Add(acc);
ucFTPAccounts.AccountsList.Items.Add(acc);
ucFTPAccounts.AccountsList.SelectedIndex = ucFTPAccounts.AccountsList.Items.Count - 1;
ucFTPAccounts.AddItem(acc);
FTPSetup(Config.FTPAccountList);
}
private void FTPAccountRemoveButton_Click(object sender, EventArgs e)
{
int sel = ucFTPAccounts.AccountsList.SelectedIndex;
int sel = ucFTPAccounts.lbAccounts.SelectedIndex;
if (ucFTPAccounts.RemoveItem(sel))
{
Config.FTPAccountList.RemoveAt(sel);
@ -637,30 +560,20 @@ private void FTPAccountRemoveButton_Click(object sender, EventArgs e)
FTPSetup(Config.FTPAccountList);
}
private void FTPAccountDuplicateButton_Click(object sender, EventArgs e)
{
FTPAccount src = (FTPAccount)ucFTPAccounts.lbAccounts.Items[ucFTPAccounts.lbAccounts.SelectedIndex];
FTPAccount clone = (FTPAccount)src.Clone();
Config.FTPAccountList.Add(clone);
ucFTPAccounts.AddItem(clone);
FTPSetup(Config.FTPAccountList);
}
private void FTPAccountTestButton_Click(object sender, EventArgs e)
{
if (CheckFTPAccounts())
{
TestFTPAccount(Config.FTPAccountList[ucFTPAccounts.AccountsList.SelectedIndex], false);
}
}
private void FTPAccountCloneButton_Click(object sender, EventArgs e)
{
FTPAccount src = ucFTPAccounts.AccountsList.Items[ucFTPAccounts.AccountsList.SelectedIndex] as FTPAccount;
Config.FTPAccountList.Add(src.Clone());
ucFTPAccounts.AccountsList.SelectedIndex = ucFTPAccounts.AccountsList.Items.Count - 1;
FTPSetup(Config.FTPAccountList);
}
private void FTPAccountsList_SelectedIndexChanged(object sender, EventArgs e)
{
int sel = ucFTPAccounts.AccountsList.SelectedIndex;
if (Config.FTPAccountList.IsValidIndex(sel))
{
FTPAccount acc = Config.FTPAccountList[sel];
ucFTPAccounts.SettingsGrid.SelectedObject = acc;
TestFTPAccount(Config.FTPAccountList[ucFTPAccounts.lbAccounts.SelectedIndex], false);
}
}
@ -671,8 +584,97 @@ private void FtpAccountSettingsGrid_PropertyValueChanged(object s, PropertyValue
#endregion FTP
#region Localhost
private void LocalhostAccountsSetup(IEnumerable<LocalhostAccount> accs)
{
if (accs != null)
{
int sel = ucLocalhostAccounts.lbAccounts.SelectedIndex;
ucLocalhostAccounts.lbAccounts.Items.Clear();
Config.LocalhostAccountList = new List<LocalhostAccount>();
Config.LocalhostAccountList.AddRange(accs);
cboSharedFolderFiles.Items.Clear();
cboSharedFolderImages.Items.Clear();
cboSharedFolderText.Items.Clear();
foreach (LocalhostAccount acc in Config.LocalhostAccountList)
{
ucLocalhostAccounts.lbAccounts.Items.Add(acc);
cboSharedFolderFiles.Items.Add(acc);
cboSharedFolderImages.Items.Add(acc);
cboSharedFolderText.Items.Add(acc);
}
if (ucLocalhostAccounts.lbAccounts.Items.Count > 0)
{
ucLocalhostAccounts.lbAccounts.SelectedIndex = sel.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
cboSharedFolderFiles.SelectedIndex = Config.LocalhostSelectedFiles.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
cboSharedFolderImages.SelectedIndex = Config.LocalhostSelectedImages.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
cboSharedFolderText.SelectedIndex = Config.LocalhostSelectedText.Between(0, ucLocalhostAccounts.lbAccounts.Items.Count - 1);
}
}
}
private void LocalhostAccountAddButton_Click(object sender, EventArgs e)
{
LocalhostAccount acc = new LocalhostAccount("New account");
Config.LocalhostAccountList.Add(acc);
ucLocalhostAccounts.AddItem(acc);
}
private void LocalhostAccountRemoveButton_Click(object sender, EventArgs e)
{
int sel = ucLocalhostAccounts.lbAccounts.SelectedIndex;
if (ucLocalhostAccounts.RemoveItem(sel))
{
Config.LocalhostAccountList.RemoveAt(sel);
}
}
private void LocalhostAccountDuplicateButton_Click(object sender, EventArgs e)
{
LocalhostAccount src = (LocalhostAccount)ucLocalhostAccounts.lbAccounts.Items[ucLocalhostAccounts.lbAccounts.SelectedIndex];
LocalhostAccount clone = (LocalhostAccount)src.Clone();
Config.LocalhostAccountList.Add(clone);
ucLocalhostAccounts.AddItem(clone);
}
private void SettingsGrid_LocalhostPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
LocalhostAccountsSetup(Config.LocalhostAccountList);
}
#endregion Localhost
#region Twitter
private void TwitterAccountAddButton_Click(object sender, EventArgs e)
{
OAuthInfo acc = new OAuthInfo(APIKeys.TwitterConsumerKey, APIKeys.TwitterConsumerSecret);
Config.TwitterOAuthInfoList.Add(acc);
ucTwitterAccounts.AddItem(acc);
}
private void TwitterAccountRemoveButton_Click(object sender, EventArgs e)
{
int sel = ucTwitterAccounts.lbAccounts.SelectedIndex;
if (ucTwitterAccounts.RemoveItem(sel))
{
Config.TwitterOAuthInfoList.RemoveAt(sel);
}
}
private void TwitterAccountDuplicateButton_Click(object sender, EventArgs e)
{
OAuthInfo src = (OAuthInfo)ucTwitterAccounts.lbAccounts.Items[ucTwitterAccounts.lbAccounts.SelectedIndex];
OAuthInfo clone = (OAuthInfo)src.Clone();
Config.TwitterOAuthInfoList.Add(clone);
ucTwitterAccounts.AddItem(clone);
}
private void TwitterAccountAuthButton_Click(object sender, EventArgs e)
{
if (CheckTwitterAccounts())
@ -685,44 +687,11 @@ private void TwitterAccountAuthButton_Click(object sender, EventArgs e)
{
Config.TwitterOAuthInfoList[Config.TwitterSelectedAccount] = acc;
Helpers.LoadBrowserAsync(url);
ucTwitterAccounts.SettingsGrid.SelectedObject = acc;
ucTwitterAccounts.pgSettings.SelectedObject = acc;
}
}
}
private void TwitterAccountRemoveButton_Click(object sender, EventArgs e)
{
int sel = ucTwitterAccounts.AccountsList.SelectedIndex;
if (ucTwitterAccounts.RemoveItem(sel))
{
Config.TwitterOAuthInfoList.RemoveAt(sel);
}
}
private void TwitterAccountList_SelectedIndexChanged(object sender, EventArgs e)
{
int sel = ucTwitterAccounts.AccountsList.SelectedIndex;
Config.TwitterSelectedAccount = sel;
if (CheckTwitterAccounts())
{
OAuthInfo acc = Config.TwitterOAuthInfoList[sel];
ucTwitterAccounts.SettingsGrid.SelectedObject = acc;
}
}
private void TwitterAccountAddButton_Click(object sender, EventArgs e)
{
OAuthInfo acc = new OAuthInfo(APIKeys.TwitterConsumerKey, APIKeys.TwitterConsumerSecret);
Config.TwitterOAuthInfoList.Add(acc);
ucTwitterAccounts.AccountsList.Items.Add(acc);
ucTwitterAccounts.AccountsList.SelectedIndex = ucTwitterAccounts.AccountsList.Items.Count - 1;
if (CheckTwitterAccounts())
{
ucTwitterAccounts.SettingsGrid.SelectedObject = acc;
}
}
#endregion Twitter
}
}

View file

@ -893,7 +893,7 @@ private void FTPOpenClient()
{
if (CheckFTPAccounts())
{
new FTPClientForm(Config.FTPAccountList[ucFTPAccounts.AccountsList.SelectedIndex]).Show();
new FTPClientForm(Config.FTPAccountList[ucFTPAccounts.lbAccounts.SelectedIndex]).Show();
}
}

View file

@ -23,11 +23,12 @@ You should have received a copy of the GNU General Public License
#endregion License Information (GPL v3)
using System;
using System.ComponentModel;
namespace UploadersLib.HelperClasses
{
public class OAuthInfo
public class OAuthInfo : ICloneable
{
public enum OAuthInfoSignatureMethod
{
@ -107,5 +108,15 @@ public override string ToString()
{
return Description;
}
public OAuthInfo Clone()
{
return MemberwiseClone() as OAuthInfo;
}
object ICloneable.Clone()
{
return Clone();
}
}
}