File tree Expand file tree Collapse file tree
GameFrameX.Foundation.Options Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,11 +27,6 @@ public static class OptionsDebugger
2727 /// <param name="options">解析后的选项对象</param>
2828 public static void PrintParsedOptions < T > ( T options ) where T : class
2929 {
30- Console . WriteLine ( "╔══════════════════════════════════════════════════════════════════════╗" ) ;
31- Console . WriteLine ( "║ Command-line parameter and parsed configuration object information ║" ) ;
32- Console . WriteLine ( "╚══════════════════════════════════════════════════════════════════════╝" ) ;
33- Console . WriteLine ( ) ;
34-
3530 try
3631 {
3732 // 使用反射获取所有属性
@@ -155,6 +150,19 @@ public static void PrintParsedOptions<T>(T options) where T : class
155150 }
156151
157152 int maxTableWidth = Math . Max ( 60 , consoleWidth - 1 ) ;
153+
154+ // 计算最终表格宽度,用于上方/下方的双线边框和居中标题
155+ int tableWidth = CalculateTotalWidth ( ) ;
156+ string topDouble = "╔" + new string ( '═' , Math . Max ( 0 , tableWidth - 2 ) ) + "╗" ;
157+ string bottomDouble = "╚" + new string ( '═' , Math . Max ( 0 , tableWidth - 2 ) ) + "╝" ;
158+ string headerText = "Command-line parameter and parsed configuration object information" ;
159+ string centeredHeader = CenterPadDisplay ( headerText , Math . Max ( 0 , tableWidth - 2 ) ) ;
160+
161+ Console . WriteLine ( topDouble ) ;
162+ Console . WriteLine ( $ "║{ centeredHeader } ║") ;
163+ Console . WriteLine ( bottomDouble ) ;
164+ Console . WriteLine ( ) ;
165+
158166 while ( CalculateTotalWidth ( ) > maxTableWidth )
159167 {
160168 if ( descWidth > minDescWidth )
You can’t perform that action at this time.
0 commit comments