parent
27f896ba01
commit
0c6bc77eca
@ -12,12 +12,16 @@ namespace TJAPlayer3 {
|
|||||||
SqliteConnection? connection = DBSaves.GetSavesDBConnection();
|
SqliteConnection? connection = DBSaves.GetSavesDBConnection();
|
||||||
if (connection == null) {
|
if (connection == null) {
|
||||||
Trace.TraceError("Could not establish a connection to Saves.db3 database. Aborting score import.");
|
Trace.TraceError("Could not establish a connection to Saves.db3 database. Aborting score import.");
|
||||||
|
Status = "";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = "Searching for scores...";
|
Status = "Searching for scores...";
|
||||||
string[] _scoreFiles = Directory.GetFiles(TJAPlayer3.ConfigIni.strSongsPath, "*.score.ini", SearchOption.AllDirectories);
|
List<string> _scoreFiles = new List<string>();
|
||||||
Trace.TraceInformation($"{_scoreFiles.Length} score.ini files have been found. Beginning import.");
|
foreach (string path in TJAPlayer3.ConfigIni.strSongsPath.Split(';', StringSplitOptions.RemoveEmptyEntries)) {
|
||||||
|
_scoreFiles.AddRange(Directory.GetFiles(path, "*.score.ini", SearchOption.AllDirectories));
|
||||||
|
}
|
||||||
|
Trace.TraceInformation($"{_scoreFiles.Count} score.ini files have been found. Beginning import.");
|
||||||
|
|
||||||
int importcount = 0;
|
int importcount = 0;
|
||||||
Status = "Importing scores...";
|
Status = "Importing scores...";
|
||||||
@ -228,7 +232,7 @@ namespace TJAPlayer3 {
|
|||||||
Trace.TraceWarning($"Failed to import {_score} into new database. More details:\n{ex}");
|
Trace.TraceWarning($"Failed to import {_score} into new database. More details:\n{ex}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Trace.TraceInformation($"Imported {importcount} of {_scoreFiles.Length} scores from score.ini files.");
|
Trace.TraceInformation($"Imported {importcount} of {_scoreFiles.Count} scores from score.ini files.");
|
||||||
Status = "";
|
Status = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,6 @@ namespace TJAPlayer3 {
|
|||||||
TJAPlayer3.actTextConsole.tPrint((int)(x * TJAPlayer3.Skin.Resolution[0] / 1280.0), (int)(y * TJAPlayer3.Skin.Resolution[1] / 720.0), CTextConsole.EFontType.White, this.list進行文字列[i]);
|
TJAPlayer3.actTextConsole.tPrint((int)(x * TJAPlayer3.Skin.Resolution[0] / 1280.0), (int)(y * TJAPlayer3.Skin.Resolution[1] / 720.0), CTextConsole.EFontType.White, this.list進行文字列[i]);
|
||||||
y += 24;
|
y += 24;
|
||||||
}
|
}
|
||||||
TJAPlayer3.actTextConsole.tPrint(x, y, CTextConsole.EFontType.White, this.str現在進行中);
|
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
} else if (TJAPlayer3.ConfigIsNew && !bLanguageSelected) // Prompt language selection if Config.ini is newly generated
|
} else if (TJAPlayer3.ConfigIsNew && !bLanguageSelected) // Prompt language selection if Config.ini is newly generated
|
||||||
|
Loading…
Reference in New Issue
Block a user