@@ -29,7 +29,7 @@ public abstract class BaseNode
2929 private string comment = string . Empty ;
3030
3131 /// <summary>Gets or sets the offset of the node.</summary>
32- public IntPtr Offset { get ; set ; }
32+ public int Offset { get ; set ; }
3333
3434 /// <summary>Gets or sets the name of the node. If a new name was set the property changed event gets fired.</summary>
3535 public virtual string Name { get => name ; set { if ( value != null && name != value ) { name = value ; NameChanged ? . Invoke ( this ) ; } } }
@@ -62,7 +62,7 @@ private void ObjectInvariants()
6262 {
6363 Contract . Invariant ( name != null ) ;
6464 Contract . Invariant ( comment != null ) ;
65- Contract . Invariant ( Offset . ToInt32 ( ) >= 0 ) ;
65+ Contract . Invariant ( Offset >= 0 ) ;
6666 Contract . Invariant ( LevelsOpen != null ) ;
6767 }
6868
@@ -292,7 +292,7 @@ protected void AddHotSpot(ViewInfo view, Rectangle spot, string text, int id, Ho
292292 {
293293 Rect = spot ,
294294 Text = text ,
295- Address = view . Address . Add ( Offset ) ,
295+ Address = view . Address + Offset ,
296296 Id = id ,
297297 Type = type ,
298298 Node = this ,
@@ -349,12 +349,12 @@ protected int AddAddressOffset(ViewInfo view, int x, int y)
349349
350350 if ( view . Settings . ShowNodeOffset )
351351 {
352- x = AddText ( view , x , y , view . Settings . OffsetColor , HotSpot . NoneId , $ "{ Offset . ToInt32 ( ) : X04} ") + view . Font . Width ;
352+ x = AddText ( view , x , y , view . Settings . OffsetColor , HotSpot . NoneId , $ "{ Offset : X04} ") + view . Font . Width ;
353353 }
354354
355355 if ( view . Settings . ShowNodeAddress )
356356 {
357- x = AddText ( view , x , y , view . Settings . AddressColor , HotSpot . AddressId , view . Address . Add ( Offset ) . ToString ( Constants . AddressHexFormat ) ) + view . Font . Width ;
357+ x = AddText ( view , x , y , view . Settings . AddressColor , HotSpot . AddressId , ( view . Address + Offset ) . ToString ( Constants . AddressHexFormat ) ) + view . Font . Width ;
358358 }
359359
360360 return x ;
0 commit comments