Example #1
0
        /// <summary>
        /// Catches mouse wheel movement for zoom in/out of image in picture box
        /// </summary>
        /// <param name="sender">Not needed</param>
        /// <param name="e">Needed for mouse wheel delta value and cursor location</param>
        private void pictureBoxMain_MouseWheel(object sender, MouseEventArgs e)
        {
            panAndZoom.OnMouseWheel(e, ModifierKeys);

            // Module's mouse handling.
            if (currModule != null &&
                currModule.MouseWheel != null)
            {
                currModule.MouseWheel(sender, transformMouseEvent(e));
            }
        }
Example #2
0
        /// <summary>
        /// Catches mouse wheel movement for zoom in/out of image in picture box
        /// </summary>
        /// <param name="sender">Not needed</param>
        /// <param name="e">Needed for mouse wheel delta value and cursor location</param>
        private void pictureBoxMain_MouseWheel(object sender, MouseEventArgs e)
        {
            panAndZoom.OnMouseWheel(e, ModifierKeys);

            // MT-safe currentModule.
            IRasterModule cm = currModuleSafe();

            // Module's mouse handling.
            if (cm != null &&
                cm.MouseWheel != null)
            {
                cm.MouseWheel(sender, transformMouseEvent(e));
            }
        }