Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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();
        }