Exemplo n.º 1
0
 public void UpdateItem(int index, FundListPush.Items info, ButtonCustom.VoidDelegateObj callback)
 {
     this.itemId = index;
     this.m_textDays.set_text(string.Format(GameDataUtils.GetChineseContent(513169, false), info.days));
     this.m_textCount.set_text("x" + info.itemNum);
     this.m_imageGot.SetActive(info.hasGetPrize);
     this.m_BtnGet.get_gameObject().SetActive(!info.hasGetPrize);
     this.m_BtnGet.set_enabled(info.canGetFlag);
     this.m_imageBtnDisable.SetActive(!info.canGetFlag);
     this.m_BtnGet.onClickCustom = callback;
 }
Exemplo n.º 2
0
    private void AddScrollCell(int index, FundListPush.Items info)
    {
        Transform transform = this.m_awardlist.get_transform().FindChild("InvestFundItem" + index);

        if (transform != null)
        {
            transform.get_gameObject().SetActive(true);
            transform.GetComponent <InvestFundItem>().UpdateItem(index + 1, info, new ButtonCustom.VoidDelegateObj(this.OnCellBtnClick));
        }
        else
        {
            GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("InvestFundItem");
            instantiate2Prefab.get_transform().SetParent(this.m_awardlist.get_transform(), false);
            instantiate2Prefab.set_name("InvestFundItem" + index);
            instantiate2Prefab.SetActive(true);
            instantiate2Prefab.GetComponent <InvestFundItem>().UpdateItem(index + 1, info, new ButtonCustom.VoidDelegateObj(this.OnCellBtnClick));
        }
    }