Пример #1
0
    public void FillContent(RecordObj obj, GoBuyDelegate onGoBuy)
    {
        if (lotteryId == -1 || lotteryId == obj.lotteryId)
        {
            lotteryId = obj.lotteryId;
        }
        else
        {
            return;
        }

        lotteryNameLabel.text = ConfigManager.Instance.GetLotteryCfgLoader().GetLotteryConfig(obj.lotteryId).name;


        recordObj = obj;
        goBuy     = onGoBuy;
        List <RecordItemObj> list = obj.recordItems;

        if (list == null || list.Count == 0)
        {
            return;
        }
        titleNO.text       = list[0].titleStr;
        lotteryResult.text = getResultStr_big(obj.lotteryType, list[0]);


        int count = list.Count - 1 > 3 ? 3 : list.Count - 1;

        for (int i = 0; i < count; i++)
        {
            Nos[i].text     = list[i + 1].titleStr;
            Results[i].text = getResultStr(obj.lotteryType, list[i + 1]);
        }
    }
Пример #2
0
 public void UpdateInfo(RecordObj robj, GoBuyDelegate OngoBuy)
 {
     if (robj.lotteryType == 1)
     {
         for (int i = 0; i < _sscList.Count; ++i)
         {
             if (_sscList[i].lotteryId == -1)
             {
                 _sscList[i].FillContent(robj, OngoBuy);
                 break;
             }
         }
     }
     else if (robj.lotteryType == 2)
     {
         for (int i = 0; i < _3dList.Count; ++i)
         {
             if (_3dList[i].lotteryId == -1)
             {
                 _3dList[i].FillContent(robj, OngoBuy);
                 break;
             }
         }
     }
     else if (robj.lotteryType == 3)
     {
         for (int i = 0; i < _115List.Count; ++i)
         {
             if (_115List[i].lotteryId == -1)
             {
                 _115List[i].FillContent(robj, OngoBuy);
                 break;
             }
         }
     }
     else if (robj.lotteryType == 4)
     {
         for (int i = 0; i < _pk10List.Count; ++i)
         {
             if (_pk10List[i].lotteryId == -1)
             {
                 _pk10List[i].FillContent(robj, OngoBuy);
                 break;
             }
         }
     }
 }