コード例 #1
0
ファイル: ScLayer.cs プロジェクト: zanderzhg/Sc
        public bool Focus()
        {
            if (focus == true)
            {
                return(true);
            }

            if (scMgr.control.Focused)
            {
                EventArgs e        = new EventArgs();
                ScLayer   oldFocus = scMgr.FocusScControl;

                if (oldFocus != null)
                {
                    oldFocus.ScLostFocus(e);
                }

                scMgr.FocusScControl = this;
                ScGotFocus(e);
                return(true);
            }

            scMgr.FocusScControl = this;
            scMgr.control.Focus();
            return(true);
        }