private void DoShowWindow(object param) { try { UIPackage.AddPackage(WinDefine.pkgPath); contentPane = UIPackage.CreateObject(WinDefine.pkgName, WinDefine.componentName).asCom; } catch (Exception e) { Debug.LogError(e); throw; } if (CloseOnClickOutSide || (CloseOnClickOutSide && modal)) { FWindowRoot.ShowPopup(this); } else { FWindowRoot.ShowWindow(this); } gameObject = contentPane.parent.displayObject.gameObject; gameObject.name += "(" + WinDefine.name + ")"; Center(); AddRelation(FWindowRoot, RelationType.Center_Center); AddRelation(FWindowRoot, RelationType.Middle_Middle); //这两个要保证要__OnOpened之前调用 BuildChildMap(); BuildControllerMap(); __OnOpened(param); }
public FWindow Popup(object param = null, bool closeOther = false, bool showPopEffect = true) { if (WinDefine != null) { modal = true; IsShowEffect = showPopEffect; if (closeOther) { FWindowRoot.CloseAllWindows(); } DoShowWindow(param); return(this); } else { throw new Exception("该window无配置信息 winCfg "); } }