コード例 #1
0
ファイル: HexBoxState.cs プロジェクト: xornand/dnSpy
 public HexBoxState(HexBoxState other)
 {
     this.TopOffset     = other.TopOffset;
     this.Column        = other.Column;
     this.StartOffset   = other.StartOffset;
     this.EndOffset     = other.EndOffset;
     this.CaretPosition = other.CaretPosition;
     this.Selection     = other.Selection;
 }
コード例 #2
0
ファイル: HexCaret.cs プロジェクト: xornand/dnSpy
        public void SetCaret(HexBoxPosition position, double horizOffset, Rect?hexByteCaret, Rect?asciiCaret)
        {
            if (position == Position && this.horizOffset == horizOffset && hexByteInfo.Rect == hexByteCaret && asciiInfo.Rect == asciiCaret)
            {
                return;
            }
            this.position    = position;
            this.horizOffset = horizOffset;
            hexByteInfo.Initialize(hexByteCaret, position.Kind == HexBoxPositionKind.HexByte);
            asciiInfo.Initialize(asciiCaret, position.Kind == HexBoxPositionKind.Ascii);
            geometriesCreated = false;

            // Make sure caret doesn't blink when it's moving. It looks weird when quickly moving up/down
            blinkIsVisible = true;

            Redraw();
        }