private void UpdateTongCaiStatus(GameObject container)
 {
     if (container == null)
     {
         DebugHelper.Assert(false, "TongCai container is null");
         return;
     }
     if (CSysDynamicBlock.bLobbyEntryBlocked)
     {
         container.CustomSetActive(false);
         return;
     }
     container.CustomSetActive(CTongCaiSys.IsShowBuyTongCaiBtn());
 }
Ejemplo n.º 2
0
        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;
                        }
                    }
                }
            }
        }