@@ -13,19 +13,19 @@ protected int AddComment(ViewInfo view, int x, int y, float fvalue, IntPtr ivalu
1313 {
1414 Contract . Requires ( view != null ) ;
1515
16- if ( Program . Settings . ShowCommentFloat )
16+ if ( view . Settings . ShowCommentFloat )
1717 {
18- x = AddText ( view , x , y , Program . Settings . ValueColor , HotSpot . ReadOnlyId , $ "({ ( fvalue > - 99999.0f && fvalue < 99999.0f ? fvalue : 0.0f ) : 0.000} )") ;
18+ x = AddText ( view , x , y , view . Settings . ValueColor , HotSpot . ReadOnlyId , $ "({ ( fvalue > - 99999.0f && fvalue < 99999.0f ? fvalue : 0.0f ) : 0.000} )") ;
1919 }
20- if ( Program . Settings . ShowCommentInteger )
20+ if ( view . Settings . ShowCommentInteger )
2121 {
2222 if ( ivalue == IntPtr . Zero )
2323 {
24- x = AddText ( view , x , y , Program . Settings . ValueColor , HotSpot . ReadOnlyId , "(0)" ) ;
24+ x = AddText ( view , x , y , view . Settings . ValueColor , HotSpot . ReadOnlyId , "(0)" ) ;
2525 }
2626 else
2727 {
28- x = AddText ( view , x , y , Program . Settings . ValueColor , HotSpot . ReadOnlyId , $ "({ ivalue . ToInt64 ( ) } |0x{ uvalue . ToUInt64 ( ) : X} )") ;
28+ x = AddText ( view , x , y , view . Settings . ValueColor , HotSpot . ReadOnlyId , $ "({ ivalue . ToInt64 ( ) } |0x{ uvalue . ToUInt64 ( ) : X} )") ;
2929 }
3030 }
3131
@@ -34,22 +34,22 @@ protected int AddComment(ViewInfo view, int x, int y, float fvalue, IntPtr ivalu
3434 {
3535 x += view . Font . Width ;
3636
37- if ( Program . Settings . ShowCommentPointer )
37+ if ( view . Settings . ShowCommentPointer )
3838 {
39- x = AddText ( view , x , y , Program . Settings . OffsetColor , HotSpot . NoneId , "->" ) + view . Font . Width ;
40- x = AddText ( view , x , y , Program . Settings . OffsetColor , HotSpot . ReadOnlyId , namedAddress ) + view . Font . Width ;
39+ x = AddText ( view , x , y , view . Settings . OffsetColor , HotSpot . NoneId , "->" ) + view . Font . Width ;
40+ x = AddText ( view , x , y , view . Settings . OffsetColor , HotSpot . ReadOnlyId , namedAddress ) + view . Font . Width ;
4141 }
4242
43- if ( Program . Settings . ShowCommentRtti )
43+ if ( view . Settings . ShowCommentRtti )
4444 {
4545 var rtti = view . Memory . Process . ReadRemoteRuntimeTypeInformation ( ivalue ) ;
4646 if ( ! string . IsNullOrEmpty ( rtti ) )
4747 {
48- x = AddText ( view , x , y , Program . Settings . OffsetColor , HotSpot . ReadOnlyId , rtti ) + view . Font . Width ;
48+ x = AddText ( view , x , y , view . Settings . OffsetColor , HotSpot . ReadOnlyId , rtti ) + view . Font . Width ;
4949 }
5050 }
5151
52- if ( Program . Settings . ShowCommentSymbol )
52+ if ( view . Settings . ShowCommentSymbol )
5353 {
5454 var module = view . Memory . Process . GetModuleToPointer ( ivalue ) ;
5555 if ( module != null )
@@ -60,37 +60,37 @@ protected int AddComment(ViewInfo view, int x, int y, float fvalue, IntPtr ivalu
6060 var symbol = symbols . GetSymbolString ( ivalue , module ) ;
6161 if ( ! string . IsNullOrEmpty ( symbol ) )
6262 {
63- x = AddText ( view , x , y , Program . Settings . OffsetColor , HotSpot . ReadOnlyId , symbol ) + view . Font . Width ;
63+ x = AddText ( view , x , y , view . Settings . OffsetColor , HotSpot . ReadOnlyId , symbol ) + view . Font . Width ;
6464 }
6565 }
6666 }
6767 }
6868
69- if ( Program . Settings . ShowCommentString )
69+ if ( view . Settings . ShowCommentString )
7070 {
7171 var data = view . Memory . Process . ReadRemoteMemory ( ivalue , 64 ) ;
7272
7373 // First check if it could be an UTF8 string and if not try UTF16.
7474 if ( data . Take ( IntPtr . Size ) . InterpretAsUTF8 ( ) . IsPrintableData ( ) )
7575 {
7676 var text = new string ( Encoding . UTF8 . GetChars ( data ) . TakeWhile ( c => c != 0 ) . ToArray ( ) ) ;
77- x = AddText ( view , x , y , Program . Settings . TextColor , HotSpot . ReadOnlyId , $ "'{ text } '") + view . Font . Width ;
77+ x = AddText ( view , x , y , view . Settings . TextColor , HotSpot . ReadOnlyId , $ "'{ text } '") + view . Font . Width ;
7878 }
7979 else if ( data . Take ( IntPtr . Size * 2 ) . InterpretAsUTF16 ( ) . IsPrintableData ( ) )
8080 {
8181 var text = new string ( Encoding . Unicode . GetChars ( data ) . TakeWhile ( c => c != 0 ) . ToArray ( ) ) ;
82- x = AddText ( view , x , y , Program . Settings . TextColor , HotSpot . ReadOnlyId , $ "L'{ text } '") + view . Font . Width ;
82+ x = AddText ( view , x , y , view . Settings . TextColor , HotSpot . ReadOnlyId , $ "L'{ text } '") + view . Font . Width ;
8383 }
8484 }
8585
86- if ( Program . Settings . ShowCommentPluginInfo )
86+ if ( view . Settings . ShowCommentPluginInfo )
8787 {
8888 foreach ( var reader in NodeInfoReader )
8989 {
9090 var info = reader . ReadNodeInfo ( this , ivalue , view . Memory ) ;
9191 if ( info != null )
9292 {
93- x = AddText ( view , x , y , Program . Settings . PluginColor , HotSpot . ReadOnlyId , info ) + view . Font . Width ;
93+ x = AddText ( view , x , y , view . Settings . PluginColor , HotSpot . ReadOnlyId , info ) + view . Font . Width ;
9494 }
9595 }
9696 }
0 commit comments