mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Update menus, part 1
This commit is contained in:
@@ -268,15 +268,13 @@ Make a selection:
|
|||||||
|
|
||||||
1) Show command line usage
|
1) Show command line usage
|
||||||
2) Import a DAT file or folder
|
2) Import a DAT file or folder
|
||||||
3) Generate a DAT file
|
3) Generate DAT files
|
||||||
4) Generate all DAT files
|
4) DAT file tools
|
||||||
5) Convert a DAT file from RV to XML
|
5) List all available sources
|
||||||
6) Convert a DAT file from XML to RV
|
6) List all available systems
|
||||||
7) List all available sources
|
7) Add and remove systems and sources
|
||||||
8) List all available systems
|
8) " + (logger.ToFile ? "Disable Logging" : "Enable Logging") + @"
|
||||||
9) Add and remove systems and sources
|
9) Show credits
|
||||||
10) " + (logger.ToFile ? "Disable Logging" : "Enable Logging") + @"
|
|
||||||
11) Show credits
|
|
||||||
X) Exit Program
|
X) Exit Program
|
||||||
");
|
");
|
||||||
Console.Write("Enter selection: ");
|
Console.Write("Enter selection: ");
|
||||||
@@ -294,35 +292,29 @@ Make a selection:
|
|||||||
GenerateMenu();
|
GenerateMenu();
|
||||||
break;
|
break;
|
||||||
case "4":
|
case "4":
|
||||||
GenerateAllMenu();
|
DatToolsMenu();
|
||||||
break;
|
break;
|
||||||
case "5":
|
case "5":
|
||||||
ConvertXMLMenu();
|
|
||||||
break;
|
|
||||||
case "6":
|
|
||||||
ConvertRVMenu();
|
|
||||||
break;
|
|
||||||
case "7":
|
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
Build.Start("DATabase");
|
Build.Start("DATabase");
|
||||||
ListSources();
|
ListSources();
|
||||||
Console.Write("\nPress any key to continue...");
|
Console.Write("\nPress any key to continue...");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
break;
|
break;
|
||||||
case "8":
|
case "6":
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
Build.Start("DATabase");
|
Build.Start("DATabase");
|
||||||
ListSystems();
|
ListSystems();
|
||||||
Console.Write("\nPress any key to continue...");
|
Console.Write("\nPress any key to continue...");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
break;
|
break;
|
||||||
case "9":
|
case "7":
|
||||||
AddRemoveMenu();
|
AddRemoveMenu();
|
||||||
break;
|
break;
|
||||||
case "10":
|
case "8":
|
||||||
logger.ToFile = !logger.ToFile;
|
logger.ToFile = !logger.ToFile;
|
||||||
break;
|
break;
|
||||||
case "11":
|
case "9":
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
Build.Credits();
|
Build.Credits();
|
||||||
Console.Write("\nPress any key to continue...");
|
Console.Write("\nPress any key to continue...");
|
||||||
@@ -414,10 +406,11 @@ Make a selection:
|
|||||||
|
|
||||||
1) " + (norename ? "Enable game renaming" : "Disable game renaming") + @"
|
1) " + (norename ? "Enable game renaming" : "Disable game renaming") + @"
|
||||||
2) " + (old ? "Enable XML output" : "Enable RomVault output") + @"
|
2) " + (old ? "Enable XML output" : "Enable RomVault output") + @"
|
||||||
3) Enter a list of systems to generate from
|
3) List of systems to generate from" + (systems != "" ? ": " + systems : "") + @"
|
||||||
4) Enter a list of sources to generate from
|
4) List of sources to generate from" + (sources != "" ? ": " + sources : "") + @"
|
||||||
5) Enter an output folder
|
5) Enter an output folder" + (outdir != "" ? ":\n\t" + outdir : "") + @"
|
||||||
6) Generate the DAT file
|
6) Generate the DAT file
|
||||||
|
7) Generate all available DAT files
|
||||||
B) Go back to the previous menu
|
B) Go back to the previous menu
|
||||||
");
|
");
|
||||||
Console.Write("Enter selection: ");
|
Console.Write("Enter selection: ");
|
||||||
@@ -453,6 +446,12 @@ Make a selection:
|
|||||||
Console.Write("\nPress any key to continue...");
|
Console.Write("\nPress any key to continue...");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
break;
|
break;
|
||||||
|
case "7":
|
||||||
|
Console.Clear();
|
||||||
|
InitGenerateAll(outdir, norename, old);
|
||||||
|
Console.Write("\nPress any key to continue...");
|
||||||
|
Console.ReadKey();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -472,53 +471,6 @@ Make a selection:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Show the text-based generate all menu
|
|
||||||
/// </summary>
|
|
||||||
private static void GenerateAllMenu()
|
|
||||||
{
|
|
||||||
string selection = "", outdir = "";
|
|
||||||
bool norename = false, old = false;
|
|
||||||
while (selection.ToLowerInvariant() != "b")
|
|
||||||
{
|
|
||||||
Console.Clear();
|
|
||||||
Build.Start("DATabase");
|
|
||||||
Console.WriteLine(@"GENERATE ALL MENU
|
|
||||||
===========================
|
|
||||||
Make a selection:
|
|
||||||
|
|
||||||
1) " + (norename ? "Enable game renaming" : "Disable game renaming") + @"
|
|
||||||
2) " + (old ? "Enable XML output" : "Enable RomVault output") + @"
|
|
||||||
3) Enter an output folder
|
|
||||||
4) Generate all DAT files
|
|
||||||
B) Go back to the previous menu
|
|
||||||
");
|
|
||||||
Console.Write("Enter selection: ");
|
|
||||||
selection = Console.ReadLine();
|
|
||||||
switch (selection)
|
|
||||||
{
|
|
||||||
case "1":
|
|
||||||
norename = !norename;
|
|
||||||
break;
|
|
||||||
case "2":
|
|
||||||
old = !old;
|
|
||||||
break;
|
|
||||||
case "3":
|
|
||||||
Console.Clear();
|
|
||||||
Console.Write("Please enter a folder name: ");
|
|
||||||
outdir = Console.ReadLine();
|
|
||||||
break;
|
|
||||||
case "4":
|
|
||||||
Console.Clear();
|
|
||||||
InitGenerateAll(outdir, norename, old);
|
|
||||||
Console.Write("\nPress any key to continue...");
|
|
||||||
Console.ReadKey();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wrap generating all standard DATs from the database
|
/// Wrap generating all standard DATs from the database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -635,6 +587,46 @@ Make a selection:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Show the text-based DAT tools menu
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// At an unspecified future date, this will also include the following currently-separate programs:
|
||||||
|
/// - DatSplit
|
||||||
|
/// - SingleGame
|
||||||
|
/// - MergeDAT
|
||||||
|
/// - DATFromDir
|
||||||
|
/// - DatToMiss
|
||||||
|
/// </remarks>
|
||||||
|
private static void DatToolsMenu()
|
||||||
|
{
|
||||||
|
string selection = "";
|
||||||
|
while (selection.ToLowerInvariant() != "b")
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
Build.Start("DATabase");
|
||||||
|
Console.WriteLine(@"DAT TOOLS MENU
|
||||||
|
===========================
|
||||||
|
Make a selection:
|
||||||
|
|
||||||
|
1) Convert XML DAT to RV
|
||||||
|
2) Convert RV DAT to XML
|
||||||
|
B) Go back to the previous menu
|
||||||
|
");
|
||||||
|
Console.Write("Enter selection: ");
|
||||||
|
selection = Console.ReadLine();
|
||||||
|
switch (selection)
|
||||||
|
{
|
||||||
|
case "1":
|
||||||
|
ConvertRVMenu();
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
ConvertXMLMenu();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show the text-based XML to RV conversion menu
|
/// Show the text-based XML to RV conversion menu
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -70,42 +70,37 @@ namespace SabreTools.Helper
|
|||||||
Console.Write(@"
|
Console.Write(@"
|
||||||
DATabase - Import and Generate DAT files
|
DATabase - Import and Generate DAT files
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
Usage: DATabase [option] [filename|dirname|<system=sy,...> <source=so,...>]
|
Usage: DATabase [option] [filename|dirname] <filename|dirname> ...
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, -?, --help Show this help
|
-?, -h, --help Show this help
|
||||||
-i, --import Start tool in import mode
|
|
||||||
A filename or folder is required to run
|
|
||||||
-g, --generate Start tool in generate mode
|
|
||||||
system=sy,... List of system IDs
|
|
||||||
source=so,... List of source IDs
|
|
||||||
out=dir Output directory
|
|
||||||
-nr, --no-rename Don't auto-rename games
|
|
||||||
-old, --romvault Produce a DAT in RV format
|
|
||||||
-ga, --generate-all Start tool in generate all mode
|
|
||||||
-lso, --list-sources List all sources (id <= name)
|
|
||||||
-lsy, --list-systems List all systems (id <= name)
|
|
||||||
-cr, --convert-rv Convert an XML DAT to RV
|
|
||||||
-cx, --convert-xml Convert a RV DAT to XML
|
|
||||||
Both converters require a filename or folder
|
|
||||||
-l, --log Enable logging of program output
|
|
||||||
");
|
|
||||||
|
|
||||||
Console.Write("\nPress any key to continue...");
|
|
||||||
Console.ReadKey();
|
|
||||||
Console.Write(@"
|
|
||||||
Database Options:
|
|
||||||
-a, --add Add a new system or source to the database
|
-a, --add Add a new system or source to the database
|
||||||
manu=mn Manufacturer name (system only)
|
manu=mn Manufacturer name (system only)
|
||||||
system=sy System name (system only)
|
system=sy System name (system only)
|
||||||
source=sr Source name (source only)
|
source=sr Source name (source only)
|
||||||
url=ul URL (source only)
|
url=ul URL (source only)
|
||||||
|
-cr, --convert-rv Convert an XML DAT to RV
|
||||||
|
-cx, --convert-xml Convert a RV DAT to XML
|
||||||
|
Both converters require a filename or folder
|
||||||
|
-g, --generate Start tool in generate mode
|
||||||
|
-ga, --generate-all Start tool in generate all mode
|
||||||
|
system=sy,... List of system IDs
|
||||||
|
source=so,... List of source IDs
|
||||||
|
out=dir Output directory
|
||||||
|
-nr, --no-rename Don't auto-rename games
|
||||||
|
-old, --romvault Produce a DAT in RV format
|
||||||
|
-i, --import Start tool in import mode
|
||||||
|
A filename or folder is required to run
|
||||||
|
-l, --log Enable logging of program output
|
||||||
|
-lso, --list-sources List all sources (id <= name)
|
||||||
|
-lsy, --list-systems List all systems (id <= name)
|
||||||
-r, --remove Remove a system or source from the database
|
-r, --remove Remove a system or source from the database
|
||||||
system=sy System ID
|
system=sy System ID
|
||||||
source=so Source ID
|
source=so Source ID
|
||||||
|
|
||||||
Filenames and directories can't start with '-', 'system=', or 'source='
|
Filenames and directories can't start with '-', 'system=', or 'source='
|
||||||
unless prefixed by 'input='");
|
unless prefixed by 'input='
|
||||||
|
");
|
||||||
Console.Write("\nPress any key to continue...");
|
Console.Write("\nPress any key to continue...");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user