Ejemplo n.º 1
0
        private void pbPage_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            int numberOfTextLinesToMove = e.Delta * SystemInformation.MouseWheelScrollLines / 30;

            Console.WriteLine($"Hit{numberOfTextLinesToMove}");
            if (vScrollBar1.Value - numberOfTextLinesToMove >= 0 && vScrollBar1.Value - numberOfTextLinesToMove <= vScrollBar1.Maximum)
            {
                vScrollBar1.Value -= numberOfTextLinesToMove;
                Annotator.Scroll(vScrollBar1.Value);
            }
        }
Ejemplo n.º 2
0
 private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
 {
     Annotator.Scroll(vScrollBar1.Value);
 }