コード例 #1
0
 public string GetCDNUrl(uint id)
 {
     for (int i = 0; i < this.m_CDNUrlMgr.get_Count(); i++)
     {
         BannerImageSys.CDNUrl cDNUrl = this.m_CDNUrlMgr.get_Item(i);
         if (cDNUrl.id == id)
         {
             return(cDNUrl.url);
         }
     }
     return(string.Empty);
 }
コード例 #2
0
        private void PreloadBannerImage()
        {
            if (this.m_BannerImage == null)
            {
                return;
            }
            int imageListCount = this.m_BannerImage.ImageListCount;

            for (int i = 0; i < imageListCount; i++)
            {
                BannerImageSys.BannerImageInfo bannerImageInfo = this.m_BannerImage.m_ImageInfoList[i];
                if (bannerImageInfo != null)
                {
                    string text = bannerImageInfo.resImgInfo.szImgUrl;
                    if (this.isPreloadImageType((BannerImageSys.BannerType)bannerImageInfo.resImgInfo.dwBannerType))
                    {
                        this.m_BannerImage.m_ImageInfoList[i].imgLoadSucc = false;
                        text = string.Format("{0}{1}", BannerImageSys.GlobalLoadPath, text);
                        base.StartCoroutine(MonoSingleton <IDIPSys> .GetInstance().DownloadImageByTag(text, i, delegate(Texture2D text2, int imageIDX)
                        {
                            if (this.m_BannerImage != null && this.m_BannerImage.m_ImageInfoList != null && imageIDX < this.m_BannerImage.m_ImageInfoList.Length)
                            {
                                this.m_BannerImage.m_ImageInfoList[imageIDX].imgLoadSucc = true;
                            }
                        }, this.GlobalBannerImagePath, 0));
                    }
                    else if (bannerImageInfo.resImgInfo.dwBannerType == 3u)
                    {
                        this.m_DeepLinkInfo.linkType  = (int)bannerImageInfo.resImgInfo.dwJumpEntrance;
                        this.m_DeepLinkInfo.linkUrl   = bannerImageInfo.resImgInfo.szHttpUrl;
                        this.m_DeepLinkInfo.startTime = bannerImageInfo.resImgInfo.ullStartTime;
                        this.m_DeepLinkInfo.endTime   = bannerImageInfo.resImgInfo.ullEndTime;
                        this.m_DeepLinkInfo.bLoadSucc = true;
                    }
                    else if (bannerImageInfo.resImgInfo.dwBannerType == 7u)
                    {
                        this.m_QQBoxInfo.linkUrl   = bannerImageInfo.resImgInfo.szHttpUrl;
                        this.m_QQBoxInfo.startTime = bannerImageInfo.resImgInfo.ullStartTime;
                        this.m_QQBoxInfo.endTime   = bannerImageInfo.resImgInfo.ullEndTime;
                        this.m_QQBoxInfo.bLoadSucc = true;
                    }
                    else if (bannerImageInfo.resImgInfo.dwBannerType == 8u)
                    {
                        if (bannerImageInfo.resImgInfo.iTargetID > 0)
                        {
                            MonoSingleton <PandroaSys> .GetInstance().InitSys();
                        }
                    }
                    else if (bannerImageInfo.resImgInfo.dwBannerType == 13u)
                    {
                        this.ProcessNetACC(bannerImageInfo.resImgInfo);
                    }
                    else if (bannerImageInfo.resImgInfo.dwBannerType == 9u)
                    {
                        if (!string.IsNullOrEmpty(bannerImageInfo.resImgInfo.szHttpUrl) && Application.platform == RuntimePlatform.Android)
                        {
                            string   szHttpUrl = bannerImageInfo.resImgInfo.szHttpUrl;
                            string[] array     = szHttpUrl.Split(new char[]
                            {
                                ';'
                            });
                            if (array.Length > 0)
                            {
                                this.m_WaifaBlockPlatformChannel           = new BannerImageSys.WaiFaBlockPlatformChannel(array.Length);
                                this.m_WaifaBlockPlatformChannel.m_SrcInfo = szHttpUrl;
                                for (int j = 0; j < array.Length; j++)
                                {
                                    this.m_WaifaBlockPlatformChannel.m_ChannelList[j] = array[j];
                                }
                            }
                        }
                    }
                    else if (bannerImageInfo.resImgInfo.dwBannerType == 10u)
                    {
                        BannerImageSys.CDNUrl cDNUrl = default(BannerImageSys.CDNUrl);
                        cDNUrl.id  = bannerImageInfo.resImgInfo.dwID;
                        cDNUrl.url = bannerImageInfo.resImgInfo.szHttpUrl;
                        this.m_CDNUrlMgr.Add(cDNUrl);
                    }
                }
            }
        }