private void ShowForedinationHead()    //魔灵未激活状态 宿命也能够显示
    {
        Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;
        int       count    = ForeordinationHead.Length;

        for (int i = 0; i < count; ++i)
        {
            if (ForeordinationHead[i] != null)
            {
                if (i < belleTab.getAffectionConditonValueCount())
                {
                    int id = belleTab.GetAffectionConditonValuebyIndex(i);
                    ForeordinationHead[i].SetActive(true);
                    bool      isHas          = BelleData.OwnedBelleMap.ContainsKey(id);
                    Tab_Belle affectionbelle = TableManager.GetBelleByID(id, 0);
                    if (affectionbelle != null)
                    {
                        Tab_CommonItem cItem = TableManager.GetCommonItemByID(affectionbelle.BelleItemID, 0);
                        if (cItem != null)
                        {
                            UISprite us = ForeordinationHead[i].GetComponent <UISprite>();
                            if (us != null)
                            {
                                us.spriteName = Games.GlobeDefine.GlobeVar.QualityColorGrid[cItem.Quality - 1];
                                if (isHas)
                                {
                                    us.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                }
                                else
                                {
                                    us.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                }
                            }
                            Transform tf = ForeordinationHead[i].transform.Find("Head");
                            if (tf != null)
                            {
                                UISprite usc = tf.GetComponent <UISprite>();
                                if (usc != null)
                                {
                                    usc.spriteName = cItem.Icon;
                                    if (isHas)
                                    {
                                        usc.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                    }
                                    else
                                    {
                                        usc.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    ForeordinationHead[i].SetActive(false);
                }
            }
        }
    }
    public void ForeordinationClickPress(GameObject go)
    {
        int index;

        if (go != null && int.TryParse(go.name, out index) && ForeordinationTips != null)
        {
            Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;
            if (null != belleTab)
            {
                --index;
                if (index > -1 && index < belleTab.getAffectionConditonValueCount())
                {
                    int id = belleTab.GetAffectionConditonValuebyIndex(index);

                    bool      isHas          = BelleData.OwnedBelleMap.ContainsKey(id);
                    Tab_Belle affectionbelle = TableManager.GetBelleByID(id, 0);
                    if (affectionbelle != null)
                    {
                        Tab_CommonItem cItem = TableManager.GetCommonItemByID(affectionbelle.BelleItemID, 0);
                        if (cItem != null)
                        {
                            Transform tf = ForeordinationTips.transform.Find("Item");
                            if (tf != null)
                            {
                                UISprite us = tf.GetComponent <UISprite>();
                                if (us != null)
                                {
                                    us.spriteName = Games.GlobeDefine.GlobeVar.QualityColorGrid[cItem.Quality - 1];
                                    if (isHas)
                                    {
                                        us.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                    }
                                    else
                                    {
                                        us.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                    }
                                }
                            }
                            tf = ForeordinationTips.transform.Find("Item/Head");
                            if (tf != null)
                            {
                                UISprite usc = tf.GetComponent <UISprite>();
                                if (usc != null)
                                {
                                    usc.spriteName = cItem.Icon;
                                    if (isHas)
                                    {
                                        usc.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                    }
                                    else
                                    {
                                        usc.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                    }
                                }
                            }
                            tf = ForeordinationTips.transform.Find("belleName");
                            if (tf != null)
                            {
                                UILabel ul = tf.GetComponent <UILabel>();
                                if (ul != null)
                                {
                                    ul.text = affectionbelle.Name;
                                }
                            }
                            tf = ForeordinationTips.transform.Find("ForeordinationName");
                            if (tf != null)
                            {
                                UILabel ul = tf.GetComponent <UILabel>();
                                if (ul != null)
                                {
                                    ul.text = belleTab.GetAffectionNamebyIndex(index);
                                }
                            }
                            tf = ForeordinationTips.transform.Find("Property");
                            if (tf != null)
                            {
                                UILabel ul = tf.GetComponent <UILabel>();
                                if (ul != null)
                                {
                                    ul.text = belleTab.GetAffectionDescbyIndex(index);
                                }
                            }
                        }
                    }
                }
            }
        }
        if (ForeordinationTips != null)
        {
            ForeordinationTips.SetActive(true);
        }
    }
    public void SetData()
    {
        InitTab();
        if (BelleInfoWindow.Instance() != null)
        {
            Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;

            if (null == belleTab)
            {
                //LogModule.ErrorLog("BelleInfoWindow.Instance().CurSellectedBelleData is null!");
                return;
            }

            Belle curBelleData = null;
            if (BelleData.OwnedBelleMap.ContainsKey(belleTab.Id))
            {
                curBelleData = BelleData.OwnedBelleMap[belleTab.Id];
            }

            if (null == curBelleData)
            {
                return;
            }
            //名字
            m_belleName.text  = belleTab.Name;
            m_belleName.color = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);
            //战力
            curBelleData.UpdateAttrMap();
            m_battleValue.text = BelleData.GetPowerNum(curBelleData.attrMap).ToString();

            //品阶
            m_curBelleMainColor.text          = BelleData.GetBelleDescByColorLevel(curBelleData.colorLevel);
            m_curBelleMainColorPic.spriteName = BelleData.GetBelleColorPicByColorLevel(curBelleData.colorLevel);
            m_curBelleSubColor.text           = StrDictionary.GetClientDictionaryString("#{10811}", curBelleData.subLevel);
            m_curBelleMainColor.color         = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);
            m_curBelleSubColor.color          = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);

            //碎片信息
            UpdateEvalutionInfo();
            //半身像
            UnityEngine.Object belleTextureObj = ResourceManager.LoadResource(BelleData.GetBelleBigTextureName(belleTab), typeof(Texture)) as Texture;
            if (null != belleTextureObj)
            {
                m_bellePic.mainTexture = belleTextureObj as Texture;
            }

            //属性界面
            BelleAttrInfoWindow belleAttrInfoWindow = m_belleAttrWin.GetComponent <BelleAttrInfoWindow>();
            if (belleAttrInfoWindow != null)
            {
                belleAttrInfoWindow.SetBelleAttrData();
            }
            UpdateCloseState();

            SetCombatValue();

            //最大等级的一个判断
            m_EvaluBtnObj.SetActive(!curBelleData.IsMaxLevel());
            m_EvaluMaxLabel.gameObject.SetActive(curBelleData.IsMaxLevel());

            m_belleDescText.text = belleTab.Introduction;
            int count = ForeordinationHead.Length;
            for (int i = 0; i < count; ++i)
            {
                if (ForeordinationHead[i] != null)
                {
                    if (i < belleTab.getAffectionConditonValueCount())
                    {
                        int id = belleTab.GetAffectionConditonValuebyIndex(i);
                        ForeordinationHead[i].SetActive(true);
                        bool      isHas          = BelleData.OwnedBelleMap.ContainsKey(id);
                        Tab_Belle affectionbelle = TableManager.GetBelleByID(id, 0);
                        if (affectionbelle != null)
                        {
                            Tab_CommonItem cItem = TableManager.GetCommonItemByID(affectionbelle.BelleItemID, 0);
                            if (cItem != null)
                            {
                                UISprite us = ForeordinationHead[i].GetComponent <UISprite>();
                                if (us != null)
                                {
                                    us.spriteName = Games.GlobeDefine.GlobeVar.QualityColorGrid[cItem.Quality - 1];
                                    if (isHas)
                                    {
                                        us.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                    }
                                    else
                                    {
                                        us.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                    }
                                }
                                Transform tf = ForeordinationHead[i].transform.Find("Head");
                                if (tf != null)
                                {
                                    UISprite usc = tf.GetComponent <UISprite>();
                                    if (usc != null)
                                    {
                                        usc.spriteName = cItem.Icon;
                                        if (isHas)
                                        {
                                            usc.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                        }
                                        else
                                        {
                                            usc.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        ForeordinationHead[i].SetActive(false);
                    }
                }
            }
            if (HeadTone != null)
            {
                Tab_CommonItem cItem = TableManager.GetCommonItemByID(belleTab.BelleItemID, 0);
                if (cItem != null)
                {
                    UISprite us = HeadTone.GetComponent <UISprite>();
                    if (us != null)
                    {
                        us.spriteName = Games.GlobeDefine.GlobeVar.QualityColorGrid[belleTab.Quality - 1];
                    }
                    Transform tf = HeadTone.transform.Find("Head");
                    if (tf != null)
                    {
                        UISprite us1 = tf.GetComponent <UISprite>();
                        if (us1 != null)
                        {
                            us1.spriteName = cItem.Icon;
                        }
                    }
                    tf = HeadTone.transform.Find("tone");
                    if (tf != null)
                    {
                        UISprite us2 = tf.GetComponent <UISprite>();
                        if (us2 != null)
                        {
                            us2.spriteName = BelleData.GetBelleColorPicByColorLevel(BelleData.OwnedBelleMap[belleTab.Id].colorLevel);
                        }
                    }
                }
            }
        }
    }