DoubleClick() public method

Perform double click processing.
public DoubleClick ( Point pt ) : void
pt Point Control coordinates point.
return void
コード例 #1
0
        /// <summary>
        /// Raises the DoubleClick event.
        /// </summary>
        /// <param name="e">A KeyEventArgs that contains the event data.</param>
        protected override void OnDoubleClick(EventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed)
            {
                // Do we have a manager for processing mouse messages?
                ViewManager?.DoubleClick(PointToClient(MousePosition));
            }

            // Let base class fire events
            base.OnDoubleClick(e);
        }
コード例 #2
0
        /// <summary>
        /// Raises the DoubleClick event.
        /// </summary>
        /// <param name="e">A KeyEventArgs that contains the event data.</param>
        protected override void OnDoubleClick(EventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed && !Disposing)
            {
                // Do we have a manager for processing mouse messages?
                if (ViewManager != null)
                {
                    ViewManager.DoubleClick(this.PointToClient(Control.MousePosition));
                }
            }

            // Let base class fire events
            base.OnDoubleClick(e);
        }