Esempio n. 1
0
        public void OnConvert(RewardItemView item)
        {
            RewardItemData data = item.GetData <RewardItemData>();

            switch (data.Type)
            {
            case 0:
                var win = CreateChildWindow("DefAddressWindow");
                if (win == null)
                {
                    return;
                }
                win.UpdateViewWithCallBack(data.Id, item.UpdateBtns);
                break;

            case 1:
            case 2:
                Facade.Instance <TwManger>().SendAction("userAddress_yr",
                                                        new Dictionary <string, object>()
                {
                    { "id", data.Id }
                },
                                                        msg =>
                {
                    item.UpdateBtns(null);
                    ShowRewardInfo(msg);
                });
                break;
            }
        }
Esempio n. 2
0
        public void OnShowInfo(RewardItemView item)
        {
            RewardItemData data = item.GetData <RewardItemData>();

            Facade.Instance <TwManger>().SendAction("userAddress_yr",
                                                    new Dictionary <string, object>()
            {
                { "id", data.Id }
            },
                                                    mes =>
            {
                ShowRewardInfo(mes);
            });
        }