Exemplo n.º 1
0
            /// <summary>
            /// Pres the process wm key down_ page up.
            /// </summary>
            /// <param name="m">The m.</param>
            /// <returns></returns>
            protected virtual bool PreProcessWmKeyDown_PageUp(ref Message m)
            {
                long pos = HexViewer.bytePosition;
                int  cp  = HexViewer.byteCharacterPosition;

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

                pos = Math.Max(0, pos - HexViewer.hexMaxBytes);
                if (pos == 0)
                {
                    return(true);
                }

                HexViewer.SetPosition(pos);

                if (pos < HexViewer.startByte)
                {
                    HexViewer.PerformScrollPageUp();
                }

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