private void SetTextureBundle()
    {
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_i32SelectCharKind);

        if (charKindInfo == null)
        {
            return;
        }
        if (UIDataManager.IsUse256Texture())
        {
            this.FaceImageKey = charKindInfo.GetPortraitFile1((int)(this.m_bSelectGrade - 1), string.Empty) + "_256";
        }
        else
        {
            this.FaceImageKey = charKindInfo.GetPortraitFile1((int)(this.m_bSelectGrade - 1), string.Empty) + "_512";
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.FaceImageKey))
        {
            NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.FaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
        }
        if (this.bLegend)
        {
            this.RankImageKey = "rankl" + this.m_bSelectGrade.ToString();
        }
        else
        {
            this.RankImageKey = "rank" + this.m_bSelectGrade.ToString();
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.RankImageKey))
        {
            string  str     = string.Format("{0}", "UI/Soldier/" + this.RankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
            wWWItem.SetItemType(ItemType.USER_ASSETB);
            wWWItem.SetCallback(new PostProcPerItem(this.SetBundleImage), this.RankImageKey);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
        }
        this.SeasonImageKey = "font_number" + this.m_bSelectSeason.ToString();
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.SeasonImageKey))
        {
            string  str2     = string.Format("{0}", "UI/Soldier/" + this.SeasonImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            WWWItem wWWItem2 = Holder.TryGetOrCreateBundle(str2 + Option.extAsset, NkBundleCallBack.UIBundleStackName);
            wWWItem2.SetItemType(ItemType.USER_ASSETB);
            wWWItem2.SetCallback(new PostProcPerItem(this.SetBundleImage), this.SeasonImageKey);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true);
        }
        if (this.bLegend)
        {
            this.CardFrameImageKey = "card_legend";
            if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.CardFrameImageKey))
            {
                string  str3     = string.Format("{0}", "UI/Soldier/" + this.CardFrameImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
                WWWItem wWWItem3 = Holder.TryGetOrCreateBundle(str3 + Option.extAsset, NkBundleCallBack.UIBundleStackName);
                wWWItem3.SetItemType(ItemType.USER_ASSETB);
                wWWItem3.SetCallback(new PostProcPerItem(this.SetBundleImage), this.CardFrameImageKey);
                TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem3, DownGroup.RUNTIME, true);
            }
        }
        this.eBUNDLEDOWN = SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_DOWNING;
    }
    private void ClickCloseButton(IUIObject obj)
    {
        if (this.eBUNDLEDOWN == SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_OK)
        {
            this.eBUNDLEDOWN = SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_NONE;
            if (null != this.rootEffectGameObject)
            {
                UnityEngine.Object.Destroy(this.rootEffectGameObject);
            }
            Myth_Evolution_Main_DLG_ChallengeQuest myth_Evolution_Main_DLG_ChallengeQuest = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MYTH_EVOLUTION_MAIN_CHALLENGEQUEST_DLG) as Myth_Evolution_Main_DLG_ChallengeQuest;

            if (myth_Evolution_Main_DLG_ChallengeQuest != null)
            {
                myth_Evolution_Main_DLG_ChallengeQuest.OnLegendEvolutionDirectionEnd();
            }
            NrTSingleton <FormsManager> .Instance.AddReserveDeleteForm(base.WindowID);
        }
    }
    public override void Update()
    {
        if (this.bEffectUpdate && null != this.rootEffectGameObject)
        {
            if (this.eBUNDLEDOWN == SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_DOWNING)
            {
                if (NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.FaceImageKey) != null && NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.RankImageKey) != null && NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.SeasonImageKey) != null)
                {
                    GameObject gameObject2;
                    if (this.bLegend)
                    {
                        if (NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.CardFrameImageKey) == null)
                        {
                            return;
                        }
                        GameObject gameObject = NkUtil.GetChild(this.rootEffectGameObject.transform, "back").gameObject;
                        if (null != gameObject)
                        {
                            Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.CardFrameImageKey);

                            if (null != texture)
                            {
                                Material material = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath));
                                if (null != material)
                                {
                                    material.mainTexture = texture;
                                    if (null != gameObject.renderer)
                                    {
                                        gameObject.renderer.sharedMaterial = material;
                                    }
                                }
                            }
                        }
                        gameObject2 = NkUtil.GetChild(this.rootEffectGameObject.transform, "face").gameObject;
                    }
                    else
                    {
                        gameObject2 = NkUtil.GetChild(this.rootEffectGameObject.transform, "fx_plan_face").gameObject;
                    }
                    if (null != gameObject2)
                    {
                        Texture2D texture2 = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.FaceImageKey);

                        if (null != texture2)
                        {
                            Material material2 = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath));
                            if (null != material2)
                            {
                                material2.mainTexture = texture2;
                                if (null != gameObject2.renderer)
                                {
                                    gameObject2.renderer.sharedMaterial = material2;
                                }
                            }
                        }
                    }
                    GameObject gameObject3;
                    if (this.bLegend)
                    {
                        gameObject3 = NkUtil.GetChild(this.rootEffectGameObject.transform, "rank").gameObject;
                    }
                    else
                    {
                        gameObject3 = NkUtil.GetChild(this.rootEffectGameObject.transform, "fx_card_rank").gameObject;
                    }
                    if (null != gameObject3)
                    {
                        Texture2D texture3 = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.RankImageKey);

                        if (null != texture3)
                        {
                            Material material3 = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath));
                            if (null != material3)
                            {
                                material3.mainTexture = texture3;
                                if (null != gameObject3.renderer)
                                {
                                    gameObject3.renderer.sharedMaterial = material3;
                                }
                            }
                        }
                    }
                    GameObject gameObject4 = NkUtil.GetChild(this.rootEffectGameObject.transform, "fx_font_number").gameObject;
                    if (null != gameObject4)
                    {
                        Texture2D texture4 = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.SeasonImageKey);

                        if (null != texture4)
                        {
                            Material material4 = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath));
                            if (null != material4)
                            {
                                material4.mainTexture = texture4;
                                if (null != gameObject4.renderer)
                                {
                                    gameObject4.renderer.sharedMaterial = material4;
                                }
                            }
                        }
                    }
                    this.eBUNDLEDOWN = SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_DOWNCOMPLTE;
                    if (TsPlatform.IsMobile && TsPlatform.IsEditor)
                    {
                        NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootEffectGameObject);
                    }
                    this.rootEffectGameObject.SetActive(true);
                }
            }
            else if (this.eBUNDLEDOWN == SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_DOWNCOMPLTE)
            {
                Animation componentInChildren = this.rootEffectGameObject.GetComponentInChildren <Animation>();
                if (componentInChildren != null && !componentInChildren.isPlaying)
                {
                    this.FacebookGui(true);
                    this.IntroGui(true);
                    this.SetSolName();
                    this.bEffectUpdate         = false;
                    this.closeUIButton.Visible = true;
                    this.eBUNDLEDOWN           = SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_OK;
                }
            }
        }
    }