System.Windows.Forms.HexBox.KeyInterpreter.PreProcessWmKeyDown_Up C# (CSharp) Method

PreProcessWmKeyDown_Up() protected method

protected PreProcessWmKeyDown_Up ( Message &m ) : bool
m Message
return bool
            protected virtual bool PreProcessWmKeyDown_Up(ref Message m)
            {
                long pos = _hexBox._bytePos;
                int cp = _hexBox._byteCharacterPos;

                if( !(pos == 0 && cp == 0) )
                {
                    pos = Math.Max(-1, pos-_hexBox._iHexMaxHBytes);
                    if(pos == -1)
                        return true;

                    _hexBox.SetPosition(pos);

                    if(pos < _hexBox._startByte)
                    {
                        _hexBox.PerformScrollLineUp();
                    }

                    _hexBox.UpdateCaret();
                    _hexBox.Invalidate();
                }

                _hexBox.ScrollByteIntoView();
                _hexBox.ReleaseSelection();

                return true;
            }