Exemple #1
0
 public void OnUpdatePanel(short state, DiscountItemsLoginPush down = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     for (int i = 0; i < down.itemsInfo.get_Count(); i++)
     {
         DiscountItemsInfo discountItemsInfo = down.itemsInfo.get_Item(i);
         if (discountItemsInfo.isOpt && discountItemsInfo.num > 0 && !this.isHaveCurrentShangPinId())
         {
             this.CurrentShangPinId       = discountItemsInfo.id;
             this.CurrentShangPinDiscount = discountItemsInfo.discount;
             this.IsAlreadyConfirm        = true;
             this.startTimeCoundDown((int)(down.countdown / 1000f));
         }
     }
     if (down != null)
     {
         this.UpdateData(down);
         this.productDataSort();
         this.RefreshUI();
     }
     else
     {
         Debug.LogError("DiscountItemsLoginPush  is  empty!________________________________________________________________________");
     }
 }
Exemple #2
0
 private void clearData()
 {
     this.tempSelectProductId     = -1;
     this.currentShangPinId       = -1;
     this.currentShangPinDiscount = 100f;
     if (this.selectDataList != null)
     {
         this.selectDataList.Clear();
     }
     this.dataList = null;
 }
Exemple #3
0
    public void UpdatePanel()
    {
        DiscountItemsLoginPush discountItemsData = ActivityTossDiscountManager.Instance.GetDiscountItemsData();

        if (discountItemsData == null)
        {
            return;
        }
        if (discountItemsData.itemsInfo == null)
        {
            return;
        }
        this.ClearScroll();
        for (int i = 0; i < discountItemsData.itemsInfo.get_Count(); i++)
        {
            this.AddScrollCell(i, discountItemsData.itemsInfo.get_Item(i));
        }
    }
Exemple #4
0
 private void UpdateData(DiscountItemsLoginPush data)
 {
     this.dataList = data;
 }