public bool SetFocus() { //将主界面等级并且有组的界面设置焦点 if (Group != ViewGroup.None) { if (!UIMgr.GroupViews.ContainsKey(Group)) { return(false); } List <UView> views = UIMgr.GroupViews[Group].OrderBy((x) => x.RectTrans.GetSiblingIndex()).ToList(); if (views.Count == 0) { return(false); } int newIndex = views[views.Count - 1].RectTrans.GetSiblingIndex(); if (newIndex == RectTrans.GetSiblingIndex()) { return(false); } RectTrans.SetSiblingIndex(newIndex); SetDirtyAll(); return(true); } return(false); }