优化对齐方式

This commit is contained in:
2026-05-16 16:41:59 +08:00
parent 81a1726557
commit e006f83a19

View File

@@ -51,11 +51,14 @@ namespace DrillTools
private static void AppendRows(StringBuilder report, IReadOnlyList<ReportRow> rows)
{
// Column widths and gaps match the header/separator layout exactly.
// Separator sections: [0..6]=7 [9..16]=8 [20..25]=6 [37..40]=4 [52..58]=7 [61..71]=11 [74..86]=13 [89..98]=10
// Gaps between sections: 2sp 3sp 11sp 11sp 2sp 2sp 2sp
foreach (var row in rows)
{
report.AppendLine(string.Format(
CultureInfo.InvariantCulture,
"{0,8}{1,10}{2,10}{3,17}{4,16}{5,14}{6,15}{7,12}",
"{0,-7} {1,-8} {2,-6} {3,-4} {4,-7} {5,-11} {6,-13} {7,-10}",
1,
row.ToolRef,
row.ToolNumber,
@@ -72,7 +75,7 @@ namespace DrillTools
report.AppendLine("=========================================================== =========== ============= ==========");
report.AppendLine(string.Format(
CultureInfo.InvariantCulture,
"{0,69}{1,14}{2,15}{3,12}",
"{0,59} {1,-11} {2,-13} {3,-10}",
"Totals:",
rows.Sum(row => row.PlatedHits),
rows.Sum(row => row.UnplatedHits),