Updating Uplea Configuration (#1906)

* Initial check-in to address feature enhancement request #1466.

* Checking in missing constructor parameter so fork is stable.

* Wrapping up Uplea integration support for #1466.

* Reverted Uploader.cs to earlier version as those changes weren't actually needed.

* Removed use of DataContractJsonSerializer, using JSON .NET instead. Updated the Uplea class to not store the configuration object internally, but to only pull out the API key when the config is passed through its constructor.

* Incorporating recent round of refactoring changes suggested by Jaex.

* Addressing issue with user workflow on the Uplea destination configuration tab.

* Attempt to reconcile UploadersConfigForm.resx.

* Fixing the name for an unnamed label. Updating resx formatting for base64 encoded pbDropboxLogo.Image value; since the diff on GitHub was showing a material change although VS diff ignores the formatting difference. Removed unneeded string.Format from Upload() in Uplea along with the set for IsURLExpected (since it is already true by default).

* Removed extra whitespace next to the end of the value tag since GitHub diff was still showing a difference.

* Removing references to label4 from resx which weren't removed by VS automatically when the control was renamed. The new entries for the renamed control lblUpleaEmailAddress already exist in the file.

* Updating Uplea config to not store the username/password entered on the Uplea configuration tab. Removed associated event handlers. Renamed Login button to Get API Key to be more representative of the action. Made the API key textbox editable so users can blank out the key if they wish to turn off Uplea integration.
This commit is contained in:
osfancy 2016-09-14 02:04:02 -04:00 committed by Jaex
parent f0fd4d101d
commit f9f2e6b2a8
4 changed files with 2 additions and 18 deletions

View file

@ -3227,13 +3227,11 @@ private void InitializeComponent()
//
resources.ApplyResources(this.txtUpleaPassword, "txtUpleaPassword");
this.txtUpleaPassword.Name = "txtUpleaPassword";
this.txtUpleaPassword.TextChanged += new System.EventHandler(this.txtUpleaPassword_TextChanged);
//
// txtUpleaUsername
//
resources.ApplyResources(this.txtUpleaUsername, "txtUpleaUsername");
this.txtUpleaUsername.Name = "txtUpleaUsername";
this.txtUpleaUsername.TextChanged += new System.EventHandler(this.txtUpleaUsername_TextChanged);
//
// gbUpleaUserInformation
//

View file

@ -580,8 +580,6 @@ public void LoadSettings()
// Uplea
txtUpleaApiKey.Text = Config.UpleaApiKey;
txtUpleaUsername.Text = Config.UpleaUsername;
txtUpleaPassword.Text = Config.UpleaPassword;
txtUpleaEmailAddress.Text = Config.UpleaEmailAddress;
cbUpleaInstantDownloadEnabled.Checked = Config.UpleaInstantDownloadEnabled;
cbUpleaIsPremium.Checked = Config.UpleaIsPremiumMember;
@ -2590,16 +2588,6 @@ private void btnUpleaLogin_Click(object sender, EventArgs e)
}
private void txtUpleaUsername_TextChanged(object sender, EventArgs e)
{
Config.UpleaUsername = (sender as TextBox).Text;
}
private void txtUpleaPassword_TextChanged(object sender, EventArgs e)
{
Config.UpleaPassword = (sender as TextBox).Text;
}
private void txtUpleaApiKey_TextChanged(object sender, EventArgs e)
{
Config.UpleaApiKey = (sender as TextBox).Text;

View file

@ -13652,7 +13652,7 @@ Using an encrypted library disables sharing.</value>
<value>13</value>
</data>
<data name="btnUpleaLogin.Text" xml:space="preserve">
<value>Login</value>
<value>Get API Key</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -13775,7 +13775,7 @@ Using an encrypted library disables sharing.</value>
<value>Username:</value>
</data>
<data name="txtUpleaApiKey.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
<value>True</value>
</data>
<data name="txtUpleaApiKey.Location" type="System.Drawing.Point, System.Drawing">
<value>81, 78</value>

View file

@ -289,8 +289,6 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
// Uplea
public string UpleaApiKey = string.Empty;
public string UpleaUsername = string.Empty;
public string UpleaPassword = string.Empty;
public string UpleaEmailAddress = string.Empty;
public bool UpleaIsPremiumMember = false;
public bool UpleaInstantDownloadEnabled = false;