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

PreProcessWmKeyDown_ShiftRight() protected method

protected PreProcessWmKeyDown_ShiftRight ( Message &m ) : bool
m Message
return bool
            protected virtual bool PreProcessWmKeyDown_ShiftRight(ref Message m)
            {
                long pos = _hexBox._bytePos;
                long sel = _hexBox._selectionLength;

                if(pos+sel >= _hexBox._byteProvider.Length)
                    return true;

                if(_bpiStart.Index <= pos)
                {
                    sel++;
                    _hexBox.InternalSelect(pos, sel);
                    _hexBox.ScrollByteIntoView(pos+sel);
                }
                else
                {
                    pos++;
                    sel = Math.Max(0, sel-1);
                    _hexBox.InternalSelect(pos, sel);
                    _hexBox.ScrollByteIntoView();
                }

                return true;
            }