search and import "Ultrastar.db"
This commit is contained in:
1 parent
76087c502a
commit
6ba68f868a
2 files changed
+15
No files matched your search
@@ -262,6 +262,20 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
private static bool InitHighscoreDB()
|
private static bool InitHighscoreDB()
|
||||||
{
|
{
|
||||||
|
string OldDBFilePath = Path.Combine(Environment.CurrentDirectory, CSettings.sFileOldHighscoreDB);
|
||||||
|
if (File.Exists(OldDBFilePath))
|
||||||
|
{
|
||||||
|
if (File.Exists(_HighscoreFilePath))
|
||||||
|
{
|
||||||
|
CLog.LogError("Found old Highscore DB (" + OldDBFilePath + "). If you want to import it just delete the new one (" + _HighscoreFilePath + ")");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File.Copy(OldDBFilePath, _HighscoreFilePath);
|
||||||
|
File.Move(OldDBFilePath, OldDBFilePath + ".old");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SQLiteConnection connection = new SQLiteConnection();
|
SQLiteConnection connection = new SQLiteConnection();
|
||||||
connection.ConnectionString = "Data Source=" + _HighscoreFilePath;
|
connection.ConnectionString = "Data Source=" + _HighscoreFilePath;
|
||||||
SQLiteCommand command;
|
SQLiteCommand command;
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ namespace Vocaluxe.Base
|
|||||||
public const string sFileCover = "Cover.xml";
|
public const string sFileCover = "Cover.xml";
|
||||||
public const string sFileFonts = "Fonts.xml";
|
public const string sFileFonts = "Fonts.xml";
|
||||||
|
|
||||||
|
public const string sFileOldHighscoreDB = "Ultrastar.db";
|
||||||
public static string sFileHighscoreDB = "HighscoreDB.sqlite";
|
public static string sFileHighscoreDB = "HighscoreDB.sqlite";
|
||||||
public const string sFileCoverDB = "CoverDB.sqlite";
|
public const string sFileCoverDB = "CoverDB.sqlite";
|
||||||
public const string sFilePerformanceLog = "Performance.log";
|
public const string sFilePerformanceLog = "Performance.log";
|
||||||
|
|||||||
Reference in new issue
Block a user