ImageGlass.ImageBox.OnMouseUp C# (CSharp) Method

OnMouseUp() protected method

Raises the System.Windows.Forms.Control.MouseUp event.
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs /// A that contains the event data. ///
return void
        protected override void OnMouseUp(MouseEventArgs e)
        {
            bool doNotProcessClick;

            base.OnMouseUp(e);

            doNotProcessClick = IsPanning || IsSelecting;

            if (IsPanning)
            {
                IsPanning = false;
            }

            if (IsSelecting)
            {
                EndDrag();
            }
            WasDragCancelled = false;

            if (!doNotProcessClick && AllowZoom && AllowClickZoom && !IsPanning && SizeMode == ImageBoxSizeMode.Normal)
            {
                if (e.Button == MouseButtons.Left && ModifierKeys == Keys.None)
                {
                    ProcessMouseZoom(true, e.Location);
                }
                else if (e.Button == MouseButtons.Right || (e.Button == MouseButtons.Left && ModifierKeys != Keys.None))
                {
                    ProcessMouseZoom(false, e.Location);
                }
            }
        }
ImageBox