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

PreProcessWmKeyDown_PageDown() protected method

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

                if(pos == _hexBox._byteProvider.Length && cp == 0)
                    return true;

                pos = Math.Min(_hexBox._byteProvider.Length, pos+_hexBox._iHexMaxBytes);

                if(pos == _hexBox._byteProvider.Length)
                    cp = 0;

                _hexBox.SetPosition(pos, cp);

                if(pos > _hexBox._endByte-1)
                {
                    _hexBox.PerformScrollPageDown();
                }

                _hexBox.ReleaseSelection();
                _hexBox.UpdateCaret();
                _hexBox.Invalidate();

                return true;
            }