File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public GCCLocation()
8787 ToolPath = reg . GetValue ( "InstallFolder" ) + "" ;
8888 if ( ToolPath . Contains ( "." ) ) Version = ToolPath . AsDirectory ( ) . Name ;
8989
90- if ( ! String . IsNullOrEmpty ( ToolPath ) ) XTrace . WriteLine ( "注册表 {0} {1}" , ToolPath , Version ) ;
90+ WriteLog ( "注册表 {0} {1}" , ToolPath , Version ) ;
9191 }
9292 }
9393 #endregion
@@ -109,7 +109,7 @@ public GCCLocation()
109109 ToolPath = p ;
110110 Version = ver ;
111111
112- XTrace . WriteLine ( "本地 {0} {1}" , p , ver ) ;
112+ WriteLog ( "本地 {0} {1}" , p , ver ) ;
113113 }
114114 }
115115 }
@@ -129,5 +129,10 @@ String GetVer(String path)
129129
130130 return fi . Name . Substring ( fi . Name . LastIndexOf ( "-" ) + 1 ) . TrimEnd ( ".exe" ) ;
131131 }
132+
133+ void WriteLog ( String format , params Object [ ] args )
134+ {
135+ if ( XTrace . Debug ) XTrace . WriteLine ( format , args ) ;
136+ }
132137 }
133138}
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public ICCLocation()
9393 ToolPath = reg . GetValue ( "LastInstallPath" ) + "" ;
9494 if ( ToolPath . Contains ( "." ) ) Version = ToolPath . AsDirectory ( ) . Name . Split ( " " ) . Last ( ) ;
9595
96- if ( ! String . IsNullOrEmpty ( ToolPath ) ) XTrace . WriteLine ( "注册表 {0} {1}" , ToolPath , Version ) ;
96+ WriteLog ( "注册表 {0} {1}" , ToolPath , Version ) ;
9797 }
9898 }
9999 #endregion
@@ -118,7 +118,7 @@ public ICCLocation()
118118 ToolPath = p ;
119119 Version = ver ;
120120
121- XTrace . WriteLine ( "本地 {0} {1}" , ToolPath , Version ) ;
121+ WriteLog ( "本地 {0} {1}" , ToolPath , Version ) ;
122122 }
123123 }
124124 }
@@ -133,5 +133,10 @@ String GetVer(String path)
133133
134134 return path . AsDirectory ( ) . Name . Split ( " " ) . LastOrDefault ( ) ;
135135 }
136+
137+ void WriteLog ( String format , params Object [ ] args )
138+ {
139+ if ( XTrace . Debug ) XTrace . WriteLine ( format , args ) ;
140+ }
136141 }
137142}
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ public MDKLocation()
367367 //Version = new Version(ss[0], ss[1]);
368368 Version = reg . GetValue ( "Version" ) + "" ;
369369
370- if ( ! String . IsNullOrEmpty ( ToolPath ) ) XTrace . WriteLine ( "注册表 {0} {1}" , ToolPath , Version ) ;
370+ WriteLog ( "注册表 {0} {1}" , ToolPath , Version ) ;
371371 }
372372 }
373373 #endregion
@@ -388,7 +388,7 @@ public MDKLocation()
388388 ToolPath = p ;
389389 Version = ver ;
390390
391- XTrace . WriteLine ( "本地 {0} {1}" , p , ver ) ;
391+ WriteLog ( "本地 {0} {1}" , p , ver ) ;
392392 }
393393 }
394394 }
@@ -439,5 +439,10 @@ String GetVer(String path)
439439
440440 return "" ;
441441 }
442+
443+ void WriteLog ( String format , params Object [ ] args )
444+ {
445+ if ( XTrace . Debug ) XTrace . WriteLine ( format , args ) ;
446+ }
442447 }
443448}
You can’t perform that action at this time.
0 commit comments