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

PreProcessWmKeyDown_PageUp() protected method

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

                if(pos == 0 && cp == 0)
                    return true;

                pos = Math.Max(0, pos-_hexBox._iHexMaxBytes);
                if(pos == 0)
                    return true;

                _hexBox.SetPosition(pos);

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

                _hexBox.ReleaseSelection();
                _hexBox.UpdateCaret();
                _hexBox.Invalidate();
                return true;
            }