コード例 #1
0
        protected void Gc_MouseDown(object sender, GLMouseEventArgs e)
        {
            // System.Diagnostics.Debug.WriteLine("GC Mouse down");
            if (currentmouseover != null)
            {
                currentmouseover.FindControlUnderDisplay()?.BringToFront();     // this brings to the front of the z-order the top level element holding this element and makes it visible.

                SetViewScreenCoord(ref e);
                SetControlLocation(ref e, currentmouseover);

                OnGlobalMouseDown(currentmouseover, e);

                if (currentmouseover.Enabled)
                {
                    currentmouseover.MouseButtonsDown = e.Button;
                    currentmouseover.OnMouseDown(e);
                }

                mousedowninitialcontrol = currentmouseover;
            }
            else
            {
                OnGlobalMouseDown(null, e);

                if (this.Enabled)               // not over any control (due to screen coord clip space), so send thru the displaycontrol
                {
                    this.OnMouseDown(e);
                }
            }
        }