//-----------------------------------------------------------------------------
    //2013-7-29 Jack Wen
    public void initCardInfo(BoxManager.MessageType type, UserFriend uf)
    {
        this.setType(type);
        UserCardItem card = new UserCardItem();

        card.templateID    = uf.cardTempletID;
        card.cardID        = uf.guid;
        card.level         = uf.cardLevel;
        card.addQualityAtt = uf.attAdd;
        card.addQualityHp  = uf.hpAdd;
        card.skillLevel    = uf.skillLevel;
        card.skillStudyId  = uf.studySkillId;
        card.skillStudyLev = uf.studySkillLev;
        Tab_Card tabCard = TableManager.GetCardByID(uf.cardTempletID);

        card.quality = tabCard.Star;
        this.CalculateCardInfoAndShow(card, -1);
    }
    //-----------------------------------------------------------------------------
    //	public string getElementSpriteName(int element)
    //	{
    //		switch(element)
    //		{
    //		case 0://金
    //			return "card_nature_jin";
    //		case 1://木
    //			return "card_nature_mu";
    //		case 2://水
    //			return "card_nature_shui";
    //		case 3://火
    //			return "card_nature_huo";
    //		case 4://土
    //			return "card_nature_tu";
    //		}
    //		return null;
    //	}
    public void setType(BoxManager.MessageType type)
    {
        this.type = type;
        if (buttonNo != null)
        {
            UIEventListener.Get(buttonNo).onClick += OnButtonClick;//(OnButtonClick);
        }
        if (buttonYes != null)
        {
            UIEventListener.Get(buttonYes).onClick += OnButtonClick;//(OnButtonClick);
        }
        if (type == BoxManager.MessageType.WaitingBox)
        {
            this.startBoxTime = GameManager.Instance.globalTimeCount;
        }
#if UNITY_ANDROID
        if (type == BoxManager.MessageType.ProcessBox)
        {
            this.myAnimation = this.transform.FindChild("Panel/Ani").gameObject;
        }
#endif
    }
    public void initCardInfo(BoxManager.MessageType type, int guid, int templateid)
    {
        this.setType(type);

        List <UserCardItem> cardList = Obj_MyselfPlayer.GetMe().cardBagList;
        UserCardItem        card     = null;

        if (guid != -1)
        {
            foreach (UserCardItem myCard in cardList)
            {
                if (myCard.cardID == guid)
                {
                    card = myCard;

                    templateid = myCard.templateID;
                }
            }
        }

        this.CalculateCardInfoAndShow(card, templateid);
    }
 public void initCardInfo(BoxManager.MessageType type, UserCardItem card)
 {
     this.setType(type);
     this.CalculateCardInfoAndShow(card, -1);
 }
 public void init(BoxManager.MessageType type, string label, string titleStr)
 {
     this.setType(type);
     this.setLabel(label);
     this.setTitle(titleStr);
 }