Ejemplo n.º 1
0
 private void OnBtnComplete(CUIEvent ciEvent)
 {
     if (this.m_urlAction != null && this.m_urlAction.Execute())
     {
         this.OnCloseIDIPForm(null);
     }
     else if (this.m_bGoto && this.m_bShow && this.m_btnUrl != string.Empty)
     {
         NoticeSys.BTN_DOSOMTHING btnDoSth = this.m_btnDoSth;
         string text = this.m_btnUrl;
         this.OnCloseIDIPForm(null);
         if (btnDoSth == NoticeSys.BTN_DOSOMTHING.BTN_DOSOMTHING_URL)
         {
             CUICommonSystem.OpenUrl(text, true, 0);
         }
         else if (btnDoSth == NoticeSys.BTN_DOSOMTHING.BTN_DOSOMTHING_GAME)
         {
             int num = 0;
             int.TryParse(text, ref num);
             if (num > 0)
             {
                 CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)num, 0, 0, null);
             }
         }
         text = string.Empty;
     }
 }
Ejemplo n.º 2
0
    private void OnBtnComplete(CUIEvent ciEvent)
    {
        if ((this.m_urlAction != null) && this.m_urlAction.Execute())
        {
            this.OnCloseIDIPForm(null);
        }
        else if ((this.m_bGoto && this.m_bShow) && (this.m_btnUrl != string.Empty))
        {
            BTN_DOSOMTHING btnDoSth = this.m_btnDoSth;
            string         btnUrl   = this.m_btnUrl;
            this.OnCloseIDIPForm(null);
            switch (btnDoSth)
            {
            case BTN_DOSOMTHING.BTN_DOSOMTHING_URL:
                CUICommonSystem.OpenUrl(btnUrl, true);
                break;

            case BTN_DOSOMTHING.BTN_DOSOMTHING_GAME:
            {
                int result = 0;
                int.TryParse(btnUrl, out result);
                if (result > 0)
                {
                    CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)result);
                }
                break;
            }
            }
            btnUrl   = string.Empty;
            btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE;
        }
    }
Ejemplo n.º 3
0
        private void BannerImage_OnClickItem(CUIEvent uiEvent)
        {
            if (this.m_BannerImage == null || uiEvent.m_srcWidgetBelongedListScript != this.m_UIListScript)
            {
                return;
            }
            if (this.m_AllLoadImageInfo == null)
            {
                return;
            }
            int srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList;
            int num = this.m_AllLoadImageInfo.Length;

            if (srcWidgetIndexInBelongedList >= num)
            {
                return;
            }
            BannerImageSys.BannerImageInfo bannerImageInfo = this.m_AllLoadImageInfo[srcWidgetIndexInBelongedList];
            if (bannerImageInfo != null)
            {
                if (bannerImageInfo.resImgInfo.dwBannerType == 1u)
                {
                    CUICommonSystem.OpenUrl(bannerImageInfo.resImgInfo.szHttpUrl, true, 0);
                }
                else if (bannerImageInfo.resImgInfo.dwBannerType == 2u)
                {
                    CUICommonSystem.JumpForm(bannerImageInfo.resImgInfo.dwJumpEntrance, bannerImageInfo.resImgInfo.iTargetID, bannerImageInfo.resImgInfo.iTargetID2);
                }
            }
        }
Ejemplo n.º 4
0
        private void OnGotoChaoZhiGift(CUIEvent uiEvent)
        {
            string formPath = string.Format("{0}{1}", "UGUI/Form/System/", "SevenDayCheck/DisplayTeHuiShop.prefab");

            Singleton <CUIManager> .GetInstance().CloseForm(formPath);

            CUICommonSystem.JumpForm(19, 0, 0);
        }
Ejemplo n.º 5
0
        private void OnGotoChaoZhiGift(CUIEvent uiEvent)
        {
            string formPath = string.Format("{0}{1}", "UGUI/Form/System/", "SevenDayCheck/DisplayTeHuiShop.prefab");

            Singleton <CUIManager> .GetInstance().CloseForm(formPath);

            CUICommonSystem.JumpForm(RES_GAME_ENTRANCE_TYPE.RES_GAME_ENTRANCE_SHOP_DISCOUNT, 0, 0, null);
        }
Ejemplo n.º 6
0
 public void Jump()
 {
     if (this._config.dwJumpEntrance > 0)
     {
         CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)this._config.dwJumpEntrance);
     }
     else if (!string.IsNullOrEmpty(this._config.szJumpBtnToUrl))
     {
         CUICommonSystem.OpenUrl(this._config.szJumpBtnToUrl, true);
     }
 }
Ejemplo n.º 7
0
 public void Jump()
 {
     if (this._config.dwJumpEntrance > 0u)
     {
         CUICommonSystem.JumpForm(this._config.dwJumpEntrance, 0, 0);
     }
     else if (!string.IsNullOrEmpty(this._config.szJumpBtnToUrl))
     {
         CUICommonSystem.OpenUrl(this._config.szJumpBtnToUrl, true, 0);
     }
 }
Ejemplo n.º 8
0
        public override bool AchieveJump()
        {
            if (this._config.dwConType == 14u && this._config.ReachConParam.Length >= 2 && this._config.ReachConParam[0] == 2u)
            {
                uint num = this._config.ReachConParam[1];
                MonoSingleton <ShareSys> .GetInstance().m_ShareActivityParam.set(2, 1, new uint[]
                {
                    num
                });

                string cDNUrl = MonoSingleton <BannerImageSys> .GetInstance().GetCDNUrl(num);

                Debug.Log("share jump " + cDNUrl);
                if (!string.IsNullOrEmpty(cDNUrl))
                {
                    MonoSingleton <IDIPSys> .GetInstance().ShareActivityTask(cDNUrl);
                }
                return(true);
            }
            if (this._config.dwConType != 14u || this._config.ReachConParam.Length < 2 || this._config.ReachConParam[0] != 3u)
            {
                return(CUICommonSystem.JumpForm(this._config.dwJumpEntry, 0, 0));
            }
            uint num2 = this._config.ReachConParam[1];

            if (this._config.ReachConParam[1] <= 0u)
            {
                return(CUICommonSystem.JumpForm(this._config.dwJumpEntry, 0, 0));
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return(CUICommonSystem.JumpForm(this._config.dwJumpEntry, 0, 0));
            }
            bool flag = masterRoleInfo.IsHaveHero(num2, false);

            if (flag)
            {
                MonoSingleton <ShareSys> .GetInstance().RequestShareHeroSkinForm(num2, 0u, 5);

                return(true);
            }
            flag = masterRoleInfo.IsHaveHeroSkin(num2, false);
            if (flag)
            {
                MonoSingleton <ShareSys> .GetInstance().RequestShareHeroSkinForm(0u, num2, 10);

                return(true);
            }
            return(CUICommonSystem.JumpForm(this._config.dwJumpEntry, 0, 0));
        }
Ejemplo n.º 9
0
        public override bool AchieveJump()
        {
            if (((this._config.dwConType != 14) || (this._config.ReachConParam.Length < 2)) || (this._config.ReachConParam[0] != 2))
            {
                return(CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)this._config.dwJumpEntry));
            }
            uint id = this._config.ReachConParam[1];

            uint[] kShareParam = new uint[] { id };
            MonoSingleton <ShareSys> .GetInstance().m_ShareActivityParam.set(2, 1, kShareParam);

            string cDNUrl = MonoSingleton <BannerImageSys> .GetInstance().GetCDNUrl(id);

            Debug.Log("share jump " + cDNUrl);
            if (!string.IsNullOrEmpty(cDNUrl))
            {
                MonoSingleton <IDIPSys> .GetInstance().ShareActivityTask(cDNUrl);
            }
            return(true);
        }
Ejemplo n.º 10
0
 private void BannerImage_OnClickItem(CUIEvent uiEvent)
 {
     if (((this.m_BannerImage != null) && (uiEvent.m_srcWidgetBelongedListScript == this.m_UIListScript)) && (this.m_AllLoadImageInfo != null))
     {
         int srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList;
         int length = this.m_AllLoadImageInfo.Length;
         if (srcWidgetIndexInBelongedList < length)
         {
             BannerImageSys.BannerImageInfo info = this.m_AllLoadImageInfo[srcWidgetIndexInBelongedList];
             if (info != null)
             {
                 if (info.resImgInfo.dwBannerType == 1)
                 {
                     CUICommonSystem.OpenUrl(info.resImgInfo.szHttpUrl, true);
                 }
                 else if (info.resImgInfo.dwBannerType == 2)
                 {
                     CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)info.resImgInfo.dwJumpEntrance);
                 }
             }
         }
     }
 }
Ejemplo n.º 11
0
        public void OnPandoraEvent(object data)
        {
            com.tencent.pandora.Logger.d("OnPandoraEvent enter");
            if (this.m_bInit)
            {
                Notification notification = (Notification)data;
                string       json         = (string)notification.data;
                Dictionary <string, object> dictionary = null;
                try
                {
                    dictionary = Json.Deserialize(json) as Dictionary <string, object>;
                }
                catch (Exception exception)
                {
                    com.tencent.pandora.Logger.d("协议无法解析:" + json + "," + exception.Message);
                    return;
                }
                if ((dictionary != null) && dictionary.ContainsKey("type"))
                {
                    string str2 = dictionary["type"].ToString();
                    string s    = string.Empty;
                    if (dictionary.ContainsKey("content"))
                    {
                        s = dictionary["content"].ToString();
                    }
                    if (str2 == "redpoint")
                    {
                        int result = 0;
                        int.TryParse(s, out result);
                        if (result <= 0)
                        {
                            this.m_bShowRedPoint = false;
                        }
                        else
                        {
                            this.m_bShowRedPoint = true;
                        }
                        Singleton <ActivitySys> .GetInstance().PandroaUpdateBtn();

                        Singleton <EventRouter> .instance.BroadCastEvent("IDIPNOTICE_UNREAD_NUM_UPDATE");
                    }
                    else if (str2.Equals("showIcon"))
                    {
                        if (s.Equals("1"))
                        {
                            this.m_bShowBoxBtn = true;
                        }
                        else
                        {
                            this.m_bShowBoxBtn = false;
                        }
                        Singleton <ActivitySys> .GetInstance().PandroaUpdateBtn();
                    }
                    else if (str2.Equals("closePopNews"))
                    {
                        this.m_bShowPopNew = true;
                    }
                    else if (str2.Equals("ShowGameWindow"))
                    {
                        int num2 = 0;
                        int.TryParse(s, out num2);
                        com.tencent.pandora.Logger.d("ShowGameWindow:" + num2);
                        if (num2 > 0)
                        {
                            CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)num2);
                        }
                    }
                    else if (str2.Equals("refreshDiamond"))
                    {
                        Debug.Log("pandorasys ShowGameWindow");
                        Singleton <CPaySystem> .GetInstance().OnPandroiaPaySuccss();
                    }
                }
                com.tencent.pandora.Logger.d("strCmd:" + json);
            }
        }
Ejemplo n.º 12
0
 private void OnClickGotoEntry(CUIEvent uiEvent)
 {
     CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)uiEvent.m_eventParams.tag);
 }
Ejemplo n.º 13
0
        public bool Execute()
        {
            switch (this.action)
            {
            case UrlAction.Action.openUrl:
                CUICommonSystem.OpenUrl(this.url, false, 0);
                break;

            case UrlAction.Action.openForm:
                CUICommonSystem.JumpForm(this.form, 0, 0, null);
                break;

            case UrlAction.Action.buy:
                switch (this.prodType)
                {
                case COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP:
                    if (GameDataMgr.specSaleDict.ContainsKey(this.prodID))
                    {
                        CMallFactoryShopController.ShopProduct theSp = new CMallFactoryShopController.ShopProduct(GameDataMgr.specSaleDict[this.prodID]);
                        Singleton <CMallFactoryShopController> .GetInstance().StartShopProduct(theSp);

                        goto IL_231;
                    }
                    return(false);

                case COM_ITEM_TYPE.COM_OBJTYPE_HERO:
                {
                    CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                    if (masterRoleInfo == null)
                    {
                        Singleton <CUIManager> .GetInstance().OpenTips("internalError", false, 1.5f, null, new object[0]);

                        return(false);
                    }
                    if (masterRoleInfo.IsHaveHero(this.prodID, false))
                    {
                        Singleton <CUIManager> .GetInstance().OpenTips("hasOwnHero", true, 1.5f, null, new object[0]);

                        return(false);
                    }
                    CUIEvent cUIEvent = new CUIEvent();
                    cUIEvent.m_eventID            = enUIEventID.HeroInfo_OpenBuyHeroForm;
                    cUIEvent.m_eventParams.heroId = this.prodID;
                    Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(cUIEvent);

                    goto IL_231;
                }

                case COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN:
                {
                    CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                    if (masterRoleInfo2 == null)
                    {
                        Singleton <CUIManager> .GetInstance().OpenTips("internalError", false, 1.5f, null, new object[0]);

                        return(false);
                    }
                    if (!masterRoleInfo2.IsHaveHero(this.prodID, false))
                    {
                        Singleton <CUIManager> .GetInstance().OpenTips("Skin_NeedToBuyAHero", true, 1.5f, null, new object[0]);

                        return(false);
                    }
                    if (masterRoleInfo2.IsHaveHeroSkin(this.prodID, (uint)this.prodSpec, false))
                    {
                        Singleton <CUIManager> .GetInstance().OpenTips("hasOwnHeroSkin", true, 1.5f, null, new object[0]);

                        return(false);
                    }
                    CUIEvent cUIEvent2 = new CUIEvent();
                    cUIEvent2.m_eventID = enUIEventID.HeroSkin_OpenBuySkinForm;
                    cUIEvent2.m_eventParams.heroSkinParam.heroId = this.prodID;
                    cUIEvent2.m_eventParams.heroSkinParam.skinId = (uint)this.prodSpec;
                    Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(cUIEvent2);

                    goto IL_231;
                }
                }
                return(false);

IL_231:
                break;

            case UrlAction.Action.openMatchUrl:
                CUICommonSystem.OpenUrl(this.target, true, 0);
                break;

            default:
                return(false);
            }
            return(true);
        }
 private void OnMallJumpForm(CUIEvent uiEvent)
 {
     CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)uiEvent.m_eventParams.tag, 0, 0, null);
 }
Ejemplo n.º 15
0
        public void OnPandoraEvent(Dictionary <string, string> dictData)
        {
            com.tencent.pandora.Logger.DEBUG("OnPandoraEvent enter");
            if (!this.m_bInit)
            {
                return;
            }
            if (dictData != null && dictData.ContainsKey("type"))
            {
                string text  = dictData.get_Item("type");
                string text2 = string.Empty;
                if (dictData.ContainsKey("content"))
                {
                    text2 = dictData.get_Item("content");
                }
                if (text == "redpoint")
                {
                    int num = 0;
                    int.TryParse(text2, ref num);
                    if (num <= 0)
                    {
                        this.m_bShowRedPoint = false;
                    }
                    else
                    {
                        this.m_bShowRedPoint = true;
                    }
                    Singleton <ActivitySys> .GetInstance().PandroaUpdateBtn();

                    Singleton <EventRouter> .get_instance().BroadCastEvent("IDIPNOTICE_UNREAD_NUM_UPDATE");
                }
                else if (text.Equals("showIcon"))
                {
                    if (text2.Equals("1"))
                    {
                        this.m_bShowBoxBtn = true;
                    }
                    else
                    {
                        this.m_bShowBoxBtn = false;
                    }
                    Singleton <ActivitySys> .GetInstance().PandroaUpdateBtn();
                }
                else if (text.Equals("closePopNews"))
                {
                    this.m_bShowPopNew = true;
                }
                else if (text.Equals("ShowGameWindow"))
                {
                    int num2 = 0;
                    int.TryParse(text2, ref num2);
                    com.tencent.pandora.Logger.DEBUG("ShowGameWindow:" + num2);
                    if (num2 > 0)
                    {
                        CUICommonSystem.JumpForm(num2, 0, 0);
                    }
                }
                else if (text.Equals("refreshDiamond"))
                {
                    Debug.Log("pandorasys ShowGameWindow");
                    Singleton <CPaySystem> .GetInstance().OnPandroiaPaySuccss();
                }
                else if (text.Equals("share"))
                {
                    string text3 = string.Empty;
                    string url   = string.Empty;
                    string title = string.Empty;
                    string desc  = string.Empty;
                    string text4 = string.Empty;
                    int    num3  = 0;
                    if (dictData.ContainsKey("sendType"))
                    {
                        text3 = dictData.get_Item("sendType");
                        num3++;
                    }
                    if (dictData.ContainsKey("url"))
                    {
                        url = dictData.get_Item("url");
                        num3++;
                    }
                    if (dictData.ContainsKey("title"))
                    {
                        title = dictData.get_Item("title");
                        num3++;
                    }
                    if (dictData.ContainsKey("desc"))
                    {
                        desc = dictData.get_Item("desc");
                        num3++;
                    }
                    if (dictData.ContainsKey("static_kind"))
                    {
                        text4 = dictData.get_Item("static_kind");
                        num3++;
                    }
                    if (num3 == 5)
                    {
                        int shareType = 0;
                        if (int.TryParse(text3, ref shareType))
                        {
                            Singleton <ApolloHelper> .GetInstance().ShareRedBox(shareType, url, title, desc);
                        }
                    }
                    else
                    {
                        Debug.Log("pandroa sys parm error");
                    }
                }
            }
        }
Ejemplo n.º 16
0
 private void OnMallJumpForm(CUIEvent uiEvent)
 {
     CUICommonSystem.JumpForm(uiEvent.m_eventParams.tag, 0, 0);
 }
Ejemplo n.º 17
0
 public override bool AchieveJump()
 {
     return(CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)this._config.dwJumpEntry));
 }
Ejemplo n.º 18
0
        private void OnClickGotoEntry(CUIEvent uiEvent)
        {
            RES_GAME_ENTRANCE_TYPE tag = uiEvent.m_eventParams.tag;

            CUICommonSystem.JumpForm(tag, 0, 0);
        }