File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -502,6 +502,9 @@ protected void RaisePositionChanged ()
502
502
/// </summary>
503
503
protected virtual void OnPositionChanged ( HexViewEventArgs e ) { }
504
504
505
+ /// <summary>Event to be invoked when the position and cursor position changes.</summary>
506
+ public event EventHandler < HexViewEventArgs > ? PositionChanged ;
507
+
505
508
/// <inheritdoc/>
506
509
public override bool OnProcessKeyDown ( Key keyEvent )
507
510
{
@@ -521,15 +524,15 @@ public override bool OnProcessKeyDown (Key keyEvent)
521
524
int value ;
522
525
var k = ( char ) keyEvent . KeyCode ;
523
526
524
- if ( k >= 'A' && k <= 'F' )
527
+ if ( k is >= 'A' and <= 'F' )
525
528
{
526
529
value = k - 'A' + 10 ;
527
530
}
528
- else if ( k >= 'a' && k <= 'f' )
531
+ else if ( k is >= 'a' and <= 'f' )
529
532
{
530
533
value = k - 'a' + 10 ;
531
534
}
532
- else if ( k >= '0' && k <= '9' )
535
+ else if ( k is >= '0' and <= '9' )
533
536
{
534
537
value = k - '0' ;
535
538
}
@@ -569,9 +572,6 @@ public override bool OnProcessKeyDown (Key keyEvent)
569
572
return false ;
570
573
}
571
574
572
- /// <summary>Event to be invoked when the position and cursor position changes.</summary>
573
- public event EventHandler < HexViewEventArgs > ? PositionChanged ;
574
-
575
575
///<inheritdoc/>
576
576
public override Point ? PositionCursor ( )
577
577
{
@@ -844,7 +844,7 @@ private bool Navigate (NavigationDirection direction)
844
844
/// <inheritdoc/>
845
845
bool IDesignable . EnableForDesign ( )
846
846
{
847
- Source = new MemoryStream ( Encoding . UTF8 . GetBytes ( "HexEditor Unicode that shouldn't 𝔹Aℝ𝔽!" ) ) ;
847
+ Source = new MemoryStream ( Encoding . UTF8 . GetBytes ( "HexView data with wide codepoints: 𝔹Aℝ𝔽!" ) ) ;
848
848
849
849
return true ;
850
850
}
You can’t perform that action at this time.
0 commit comments