public void OpenBuyDianQuanPanel(CUIEvent uiEvent) { if (this.IsOpenPaySys()) { Singleton <CChatController> .GetInstance().ShowPanel(true, false); CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CPaySystem.s_buyDianQuanFormPath, false, true); if (cUIFormScript == null) { return; } GameObject obj = cUIFormScript.m_formWidgets[0]; GameObject gameObject = cUIFormScript.m_formWidgets[1]; if (NetworkAccelerator.IsCommercialized()) { obj.CustomSetActive(false); gameObject.CustomSetActive(true); if (CUIRedDotSystem.IsShowRedDotByVersion(enRedID.Lobby_PayEntry)) { CUIRedDotSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0, 0, 0); } } else { obj.CustomSetActive(CTongCaiSys.IsShowBuyTongCaiBtn()); gameObject.CustomSetActive(false); } Singleton <CTopLobbyEntry> .GetInstance().OpenForm(); this.RefreshBuyDianQuanPanel(); MonoSingleton <NobeSys> .GetInstance().ShowNobeTipsInDiamond(); if (uiEvent.m_eventID != enUIEventID.Pay_OpenBuyDianQuanPanelWithLobby) { Transform transform = cUIFormScript.transform.Find("bg/btnClose"); if (transform) { CUIEventScript component = transform.GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Click, enUIEventID.None); component.m_closeFormWhenClicked = true; } } } } }
public static void RefreshSysEntryChargeRedDot() { if (!NetworkAccelerator.IsCommercialized()) { return; } CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CLobbySystem.SYSENTRY_FORM_PATH); if (form != null) { GameObject gameObject = Utility.FindChild(form.gameObject, "PlayerBtn/Dianquan/Button"); if (gameObject != null && CUIRedDotSystem.IsShowRedDotByVersion(enRedID.Lobby_PayEntry)) { CUIRedDotSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0, 0, 0); } } }