Beispiel #1
0
        /// <summary>
        /// Perform mouse up processing.
        /// </summary>
        /// <param name="e">A MouseEventArgs that contains the event data.</param>
        /// <param name="rawPt">The actual point provided from the windows message.</param>
        public virtual void MouseUp(MouseEventArgs e, Point rawPt)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            Point pt = new Point(e.X, e.Y);

            // Set the correct active view from the point
            UpdateViewFromPoint(_control, pt);

            // Tell current view of mouse up
            if (ActiveView != null)
            {
                ActiveView.MouseUp(rawPt, e.Button);
            }

            // Release any capture of the mouse
            MouseCaptured = false;

            // Generate event to indicate the view manager has processed a mouse up
            PerformMouseUpProcessed(e);
        }