[DatFile] More tweaks

This commit is contained in:
Matt Nadareski
2016-09-27 09:48:48 -07:00
parent be935a4f9f
commit c243fa51c9

View File

@@ -4431,7 +4431,9 @@ namespace SabreTools.Helper
line += "\n"; line += "\n";
break; break;
case StatOutputFormat.HTML: case StatOutputFormat.HTML:
line = "\t\t\t<tr" + (FileName.StartsWith("DIR: ") ? " class=\"red\"" : "") +"><td>" + HttpUtility.HtmlEncode(FileName) + "</td>" line = "\t\t\t<tr" + (FileName.StartsWith("DIR: ")
? " class=\"red\"><td>" + HttpUtility.HtmlEncode(FileName.Remove(0, 5))
: "><td>" + HttpUtility.HtmlEncode(FileName)) + "</td>"
+ "<td align=\"right\">" + Style.GetBytesReadable(TotalSize) + "</td>" + "<td align=\"right\">" + Style.GetBytesReadable(TotalSize) + "</td>"
+ "<td align=\"right\">" + (game == -1 ? Files.Count : game) + "</td>" + "<td align=\"right\">" + (game == -1 ? Files.Count : game) + "</td>"
+ "<td align=\"right\">" + RomCount + "</td>" + "<td align=\"right\">" + RomCount + "</td>"
@@ -5270,7 +5272,6 @@ namespace SabreTools.Helper
List<string> games = new List<string>(); List<string> games = new List<string>();
DatFile datdata = new DatFile(); DatFile datdata = new DatFile();
datdata.Parse(filename.Item1, 0, 0, logger); datdata.Parse(filename.Item1, 0, 0, logger);
datdata.FileName = "FILE: " + datdata.FileName;
datdata.BucketByGame(false, true, logger, false); datdata.BucketByGame(false, true, logger, false);
// Output single DAT stats (if asked) // Output single DAT stats (if asked)
@@ -5414,12 +5415,19 @@ Please check the log folder if the stats scrolled offscreen", false);
<header> <header>
<title>DAT Statistics Report</title> <title>DAT Statistics Report</title>
<style> <style>
body {
background-color: lightgray;
}
.red { .red {
color: red; color: red;
} }
.right {
align: right;
}
</style> </style>
</header> </header>
<body bgcolor=""lightgray""> <body>
<h2>DAT Statistics Report (" + DateTime.Now.ToShortDateString() + @")</h2>
<table border=""1"" cellpadding=""5"" cellspacing=""0""> <table border=""1"" cellpadding=""5"" cellspacing=""0"">
"; ";
break; break;
@@ -5454,7 +5462,7 @@ Please check the log folder if the stats scrolled offscreen", false);
case StatOutputFormat.HTML: case StatOutputFormat.HTML:
head = @" <tr bgcolor=""gray""><th>File Name</th><th align=""right"">Total Size</th><th align=""right"">Games</th><th align=""right"">Roms</th>" head = @" <tr bgcolor=""gray""><th>File Name</th><th align=""right"">Total Size</th><th align=""right"">Games</th><th align=""right"">Roms</th>"
+ @"<th align=""right"">Disks</th><th align=""right"">&#35; with CRC</th><th align=""right"">&#35; with MD5</th><th align=""right"">&#35; with SHA-1</th>" + @"<th align=""right"">Disks</th><th align=""right"">&#35; with CRC</th><th align=""right"">&#35; with MD5</th><th align=""right"">&#35; with SHA-1</th>"
+ (baddumpCol ? "<th align=\"right\">Baddumps</th>" : "") + (nodumpCol ? "<th align=\"right\">Nodumps</th>" : "") + "</tr>\n"; + (baddumpCol ? "<th class=\".right\">Baddumps</th>" : "") + (nodumpCol ? "<th class=\".right\">Nodumps</th>" : "") + "</tr>\n";
break; break;
case StatOutputFormat.None: case StatOutputFormat.None:
default: default: