コード例 #1
0
        protected void Gc_MouseDoubleClick(object sender, GLMouseEventArgs e)
        {
            SetViewScreenCoord(ref e);

            if (mousedowninitialcontrol == currentmouseover && currentmouseover != null) // clicks only occur if mouse is still over initial control
            {
                e.WasFocusedAtClick = currentmouseover == currentfocus;                  // record if clicking on a focused item

                SetFocus(currentmouseover);

                if (currentmouseover != null)                    // set focus could have force a loss, thru the global focus hook
                {
                    SetControlLocation(ref e, currentmouseover); // reset location etc

                    if (currentmouseover.Enabled)
                    {
                        currentmouseover.OnMouseDoubleClick(e);
                    }
                }
            }
            else if (currentmouseover == null)        // not over any control, even control display, but still click, (due to screen coord clip space), so send thru the displaycontrol
            {
                SetFocus(null);

                if (this.Enabled)
                {
                    this.OnMouseDoubleClick(e);
                }
            }
        }