Merged r1313 and r1314 into trunk
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1315 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -12,6 +12,7 @@
|
||||
<AssemblyName>Duplicati.Library.Backend.SkyDrive</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -61,6 +62,11 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>SkyDrive.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Strings\SkyDriveSession.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>SkyDriveSession.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Strings\SkyDriveUI.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -90,6 +96,10 @@
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>SkyDrive.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Strings\SkyDriveSession.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>SkyDriveSession.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Strings\SkyDriveUI.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>SkyDriveUI.Designer.cs</LastGenOutput>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,8 +16,12 @@ namespace Duplicati.Library.Backend
|
||||
|
||||
private const string HAS_TESTED = "UI: Has tested";
|
||||
private const string INITIALPASSWORD = "UI: Temp password";
|
||||
private const string HAS_WARNED_LONG_PASSWORD = "UI: Warned long password";
|
||||
private const string HAS_WARNED_PASSWORD_CHARS = "UI: Warned password chars";
|
||||
|
||||
private bool m_hasTested;
|
||||
private bool m_hasWarnedPasswordChars;
|
||||
private bool m_hasWarnedLongPassword;
|
||||
|
||||
private const string DUPLICATI_ACTION_MARKER = "*duplicati-action*";
|
||||
private string m_uiAction = null;
|
||||
@@ -83,6 +87,12 @@ namespace Duplicati.Library.Backend
|
||||
if (!m_options.ContainsKey(HAS_TESTED) || !bool.TryParse(m_options[HAS_TESTED], out m_hasTested))
|
||||
m_hasTested = false;
|
||||
|
||||
if (!m_options.ContainsKey(HAS_WARNED_LONG_PASSWORD) || !bool.TryParse(m_options[HAS_WARNED_LONG_PASSWORD], out m_hasWarnedLongPassword))
|
||||
m_hasWarnedLongPassword = false;
|
||||
|
||||
if (!m_options.ContainsKey(HAS_WARNED_PASSWORD_CHARS) || !bool.TryParse(m_options[HAS_WARNED_PASSWORD_CHARS], out m_hasWarnedPasswordChars))
|
||||
m_hasWarnedPasswordChars = false;
|
||||
|
||||
m_options.TryGetValue(DUPLICATI_ACTION_MARKER, out m_uiAction);
|
||||
}
|
||||
|
||||
@@ -116,6 +126,32 @@ namespace Duplicati.Library.Backend
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_hasWarnedLongPassword && SkyDriveSession.IsPasswordTooLong(Password.Text))
|
||||
{
|
||||
if (MessageBox.Show(this, Strings.SkyDriveUI.LongPasswordWarning, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) != DialogResult.Yes)
|
||||
{
|
||||
try { Password.Focus(); }
|
||||
catch { }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
m_hasWarnedLongPassword = true;
|
||||
}
|
||||
|
||||
if (!m_hasWarnedPasswordChars && SkyDriveSession.HasInvalidChars(Password.Text))
|
||||
{
|
||||
if (MessageBox.Show(this, Strings.SkyDriveUI.PasswordCharactersWarning, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) != DialogResult.Yes)
|
||||
{
|
||||
try { Password.Focus(); }
|
||||
catch { }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
m_hasWarnedPasswordChars = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -126,6 +162,8 @@ namespace Duplicati.Library.Backend
|
||||
|
||||
m_options.Clear();
|
||||
m_options[HAS_TESTED] = m_hasTested.ToString();
|
||||
m_options[HAS_WARNED_LONG_PASSWORD] = m_hasWarnedLongPassword.ToString();
|
||||
m_options[HAS_WARNED_PASSWORD_CHARS] = m_hasWarnedPasswordChars.ToString();
|
||||
m_options[FOLDER] = Path.Text;
|
||||
m_options[USERNAME] = Username.Text;
|
||||
m_options[PASSWORD] = Password.Text;
|
||||
@@ -208,6 +246,8 @@ namespace Duplicati.Library.Backend
|
||||
private void Password_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_hasTested = false;
|
||||
m_hasWarnedLongPassword = false;
|
||||
m_hasWarnedPasswordChars = false;
|
||||
}
|
||||
|
||||
private void Path_TextChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.269
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Duplicati.Library.Backend.Strings {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class SkyDriveSession {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal SkyDriveSession() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Duplicati.Library.Backend.Strings.SkyDriveSession", typeof(SkyDriveSession).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Login failed, check your username and password. Consider using a password with only alphanumeric characters..
|
||||
/// </summary>
|
||||
internal static string InvalidPasswordInvalidCharsFound {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidPasswordInvalidCharsFound", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Login failed, check your username and password. Consider using a password with less than 16 characters..
|
||||
/// </summary>
|
||||
internal static string InvalidPasswordLongPasswordFound {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidPasswordLongPasswordFound", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Login failed, check your username and password..
|
||||
/// </summary>
|
||||
internal static string InvalidUsernameOrPassword {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="InvalidPasswordInvalidCharsFound" xml:space="preserve">
|
||||
<value>Login failed, check your username and password. Consider using a password with only alphanumeric characters.</value>
|
||||
</data>
|
||||
<data name="InvalidPasswordLongPasswordFound" xml:space="preserve">
|
||||
<value>Login failed, check your username and password. Consider using a password with less than 16 characters.</value>
|
||||
</data>
|
||||
<data name="InvalidUsernameOrPassword" xml:space="preserve">
|
||||
<value>Login failed, check your username and password.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.237
|
||||
// Runtime Version:4.0.30319.269
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -78,6 +78,17 @@ namespace Duplicati.Library.Backend.Strings {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your password is more than 16 characters. SkyDrive may have unexpected issues, consider changing the password.
|
||||
///
|
||||
///Do you want to continue with the current password?.
|
||||
/// </summary>
|
||||
internal static string LongPasswordWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("LongPasswordWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to On this page you can select where to store the backup data..
|
||||
/// </summary>
|
||||
@@ -95,5 +106,16 @@ namespace Duplicati.Library.Backend.Strings {
|
||||
return ResourceManager.GetString("PageTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your password contains characters that are not alphanumeric. SkyDrive may have unexpected issues, consider changing the password.
|
||||
///
|
||||
///Do you want to continue with the current password?.
|
||||
/// </summary>
|
||||
internal static string PasswordCharactersWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("PasswordCharactersWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,10 +123,20 @@
|
||||
<data name="EmptyFolderPathError" xml:space="preserve">
|
||||
<value>You must enter a folder to store the backup in</value>
|
||||
</data>
|
||||
<data name="LongPasswordWarning" xml:space="preserve">
|
||||
<value>Your password is more than 16 characters. SkyDrive may have unexpected issues, consider changing the password.
|
||||
|
||||
Do you want to continue with the current password?</value>
|
||||
</data>
|
||||
<data name="PageDescription" xml:space="preserve">
|
||||
<value>On this page you can select where to store the backup data.</value>
|
||||
</data>
|
||||
<data name="PageTitle" xml:space="preserve">
|
||||
<value>Backup storage options</value>
|
||||
</data>
|
||||
<data name="PasswordCharactersWarning" xml:space="preserve">
|
||||
<value>Your password contains characters that are not alphanumeric. SkyDrive may have unexpected issues, consider changing the password.
|
||||
|
||||
Do you want to continue with the current password?</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user