Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into develop

This commit is contained in:
Florian Kuepper committed 2012-12-22 21:23:57 +01:00
commit fff0b7f5d1
3 files changed
+15 -9

No files matched your search

+9 -5
View File
@@ -748,6 +748,7 @@ namespace Vocaluxe.Base
reader.Dispose(); reader.Dispose();
SQLiteTransaction _Transaction = connection.BeginTransaction();
// update Title and Artist strings // update Title and Artist strings
foreach (SData data in songs) foreach (SData data in songs)
{ {
@@ -767,6 +768,7 @@ namespace Vocaluxe.Base
command.Parameters.Add("@id", System.Data.DbType.Int32, 0).Value = data.id; command.Parameters.Add("@id", System.Data.DbType.Int32, 0).Value = data.id;
command.ExecuteNonQuery(); command.ExecuteNonQuery();
} }
_Transaction.Commit();
//Delete old tables after conversion //Delete old tables after conversion
command.CommandText = "DROP TABLE US_Scores;"; command.CommandText = "DROP TABLE US_Scores;";
@@ -859,7 +861,7 @@ namespace Vocaluxe.Base
else else
{ {
Sqlite3.Vdbe Stmt = new Sqlite3.Vdbe(); Sqlite3.Vdbe Stmt = new Sqlite3.Vdbe();
res = Sqlite3.sqlite3_prepare_v2(OldDB, "SELECT ID, Artist, Title FROM US_Songs", -1, ref Stmt, 0); res = Sqlite3.sqlite3_prepare_v2(OldDB, "SELECT id, Artist, Title FROM Songs", -1, ref Stmt, 0);
if (res != Sqlite3.SQLITE_OK) if (res != Sqlite3.SQLITE_OK)
{ {
@@ -898,9 +900,9 @@ namespace Vocaluxe.Base
Stmt = new Sqlite3.Vdbe(); Stmt = new Sqlite3.Vdbe();
if (!dateExists) if (!dateExists)
res = Sqlite3.sqlite3_prepare_v2(OldDB, "SELECT rowid, Player FROM US_Scores", -1, ref Stmt, 0); res = Sqlite3.sqlite3_prepare_v2(OldDB, "SELECT id, PlayerName FROM Scores", -1, ref Stmt, 0);
else else
res = Sqlite3.sqlite3_prepare_v2(OldDB, "SELECT rowid, Player, Date FROM US_Scores", -1, ref Stmt, 0); res = Sqlite3.sqlite3_prepare_v2(OldDB, "SELECT id, PlayerName, Date FROM Scores", -1, ref Stmt, 0);
if (res != Sqlite3.SQLITE_OK) if (res != Sqlite3.SQLITE_OK)
{ {
@@ -933,9 +935,10 @@ namespace Vocaluxe.Base
Sqlite3.sqlite3_finalize(Stmt); Sqlite3.sqlite3_finalize(Stmt);
} }
} }
Sqlite3.sqlite3_close(OldDB); Sqlite3.sqlite3_close(OldDB);
SQLiteTransaction _Transaction = connection.BeginTransaction();
// update Title and Artist strings // update Title and Artist strings
foreach (SData data in songs) foreach (SData data in songs)
{ {
@@ -944,7 +947,7 @@ namespace Vocaluxe.Base
command.Parameters.Add("@artist", System.Data.DbType.String, 0).Value = data.str1; command.Parameters.Add("@artist", System.Data.DbType.String, 0).Value = data.str1;
command.Parameters.Add("@id", System.Data.DbType.Int32, 0).Value = data.id; command.Parameters.Add("@id", System.Data.DbType.Int32, 0).Value = data.id;
command.ExecuteNonQuery(); command.ExecuteNonQuery();
} }
// update player names // update player names
foreach (SData data in scores) foreach (SData data in scores)
@@ -960,6 +963,7 @@ namespace Vocaluxe.Base
command.Parameters.Add("@id", System.Data.DbType.Int32, 0).Value = data.id; command.Parameters.Add("@id", System.Data.DbType.Int32, 0).Value = data.id;
command.ExecuteNonQuery(); command.ExecuteNonQuery();
} }
_Transaction.Commit();
//Delete old tables after conversion //Delete old tables after conversion
command.CommandText = "DROP TABLE US_Scores;"; command.CommandText = "DROP TABLE US_Scores;";
+2 -2
View File
@@ -39,10 +39,10 @@ namespace Vocaluxe.Base
public const int iVersionMajor = 0; public const int iVersionMajor = 0;
public const int iVersionMinor = 2; // milestones public const int iVersionMinor = 2; // milestones
public const int iVersionSub = 0; // patches public const int iVersionSub = 1; // patches
public const ERevision VersionRevision = ERevision.Release; public const ERevision VersionRevision = ERevision.Release;
public const int iBuild = 72; // Increase on every published version! Never Reset! public const int iBuild = 73; // Increase on every published version! Never Reset!
public const int iDatabaseHighscoreVersion = 2; public const int iDatabaseHighscoreVersion = 2;
public const int iDatabaseCoverVersion = 1; public const int iDatabaseCoverVersion = 1;
+4 -2
View File
@@ -731,14 +731,16 @@ namespace Vocaluxe.Screens
} }
else else
{ {
Buttons[htButtons(ButtonStart)].Visible = false; if(_sso.Selection.PartyMode && SongMenus[htSongMenus(SongMenu)].IsSmallView())
if(SongMenus[htSongMenus(SongMenu)].IsSmallView())
SongMenus[htSongMenus(SongMenu)].SetSmallView(false); SongMenus[htSongMenus(SongMenu)].SetSmallView(false);
for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++) for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++)
{ {
Buttons[htButtons(ButtonsJoker[i])].Visible = false; Buttons[htButtons(ButtonsJoker[i])].Visible = false;
Texts[htTexts(TextsPlayer[i])].Visible = false; Texts[htTexts(TextsPlayer[i])].Visible = false;
} }
Buttons[htButtons(ButtonStart)].Visible = false;
} }
return true; return true;