Esempio n. 1
0
    private void OnClickBtnGetSeverSign(GameObject sender)
    {
        ItemServerSignIn component = sender.get_transform().get_parent().get_parent().GetComponent <ItemServerSignIn>();

        if (component.itemServerSignInState == ItemServerSignIn.ItemServerSignInState.CanGetReward)
        {
            SignInManager.Instance.SendGetLoginWelfareReq(component.everydayinfoCache.loginDays);
        }
        else
        {
            string text = GameDataUtils.GetChineseContent(502215, false);
            text = text.Replace("xx", component.everydayinfoCache.loginDays.ToString());
            UIManagerControl.Instance.ShowToastText(text);
        }
    }
Esempio n. 2
0
    private Cell CellForRow_SeverSign(ListView listView, int row)
    {
        string text = "cell1";
        Cell   cell = listView.CellForReuseIndentify(text);

        if (cell == null)
        {
            cell          = new Cell(listView);
            cell.identify = text;
            GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("ItemServerSignIn");
            cell.content = instantiate2Prefab;
            instantiate2Prefab.GetComponent <RectTransform>().set_localScale(new Vector3(1f, 1f, 1f));
        }
        if (SignInManager.Instance.monthSignInfo == null)
        {
            return(cell);
        }
        ItemServerSignIn component = cell.content.GetComponent <ItemServerSignIn>();

        component.SetUI(this.listOpenSever.get_Item(row));
        component.BtnGet.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnGetSeverSign);
        return(cell);
    }