Exemple #1
0
        private IUIInput GetUIInputControl(MouseEventArgs e)
        {
            IUIInput iUIInput  = null;
            IUIInput iUIInput2 = null;
            int      num       = 2147483647;

            for (int i = 0; i < this.Count; i++)
            {
                IUIInput iUIInput3 = this[i];
                if (iUIInput3 != null && iUIInput3.Enabled && iUIInput3.HitVisible && iUIInput3.HitTest(e))
                {
                    int num2 = iUIInput3.Bounds.Width * iUIInput3.Bounds.Height;
                    if (num2 < num)
                    {
                        if (iUIInput3.GetType() == this.NoHitDefaultType)
                        {
                            iUIInput2 = iUIInput3;
                        }
                        else
                        {
                            num      = num2;
                            iUIInput = iUIInput3;
                        }
                    }
                }
            }
            if (iUIInput == null)
            {
                iUIInput = iUIInput2;
            }
            return(iUIInput);
        }