Added message that kdb-support is readonly

This commit is contained in:
Philipp Crocoll 2014-03-25 06:15:05 +01:00
parent fd08518270
commit 59525f8378
9 changed files with 15 additions and 9 deletions

View File

@ -11,5 +11,6 @@ namespace KeePassLib
byte[] HashOfLastStream { get; }
bool CanWrite { get; }
string SuccessMessage { get; }
}
}

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM</DefineConstants>
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM</DefineConstants>
<DefineConstants>TRACE;DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -55,7 +55,6 @@
<Compile Include="database\CheckDatabaseForChanges.cs" />
<Compile Include="database\edit\EditGroup.cs" />
<Compile Include="database\edit\MoveElement.cs" />
<Compile Include="database\DatabaseV1.cs" />
<Compile Include="database\KdbDatabaseLoader.cs" />
<Compile Include="database\KdbxDatabaseLoader.cs" />
<Compile Include="database\SynchronizeCachedDatabase.cs" />

View File

@ -164,6 +164,11 @@ namespace keepass2android
#endif
public byte[] HashOfLastStream { get; private set; }
public bool CanWrite { get { return false; } }
public string SuccessMessage { get
{
return
".kdb-support is read-only. Export as .kdbx if you want to modify the database. This app is for use with Keepass 2.x!";
} }
}

View File

@ -28,5 +28,6 @@ namespace keepass2android
public byte[] HashOfLastStream { get; private set; }
public bool CanWrite { get { return true; } }
public string SuccessMessage { get { return null; } }
}
}

View File

@ -115,7 +115,7 @@ namespace keepass2android
_app.LoadDatabase(_ioc, workingCopy, _compositeKey, StatusLogger, _loader);
SaveFileData(_ioc, _keyfileOrProvider);
Kp2aLog.Log("LoadDB OK");
Finish(true);
Finish(true, _loader.SuccessMessage);
}
catch (OldFormatException)
{

View File

@ -99,6 +99,8 @@ namespace Kp2aUnitTests
[TestMethod]
public void LoadFromRemoteWithDomain()
{
//warning, looks like credentials are no longer valid
var ioc = RemoteDomainIoc; //note: this property is defined in "TestLoadDbCredentials.cs" which is deliberately excluded from Git because the credentials are not public!
var app = new TestKp2aApp();
app.ServerCertificateErrorResponse = true; //accept invalid cert

View File

@ -1132,10 +1132,8 @@ namespace keepass2android
GC.Collect(); // Ensure temporary memory used while loading is collected
}
else
{
DisplayMessage(_act);
}
}
}

View File

@ -30,7 +30,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM</DefineConstants>
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>