Example #1
0
 public void InitWithBaseScene(ActivityShopData data)
 {
     this.ASData = data;
     this.mIsChecked = false;
     this.CreateObjects();
     this.Text = data.Base.Name;
     this.Icon = "FlashSale";
     base.gameObject.name = string.Format("ca{0}", data.Base.ID);
 }
Example #2
0
 public ActivityShopDataEx(ActivityShopData shop, ActivityShopItem shopItem)
 {
     this.AShopData = shop;
     this.AShopItem = shopItem;
 }
Example #3
0
 private GUIRewardCheckBtn InitActivityCheckBtn(ActivityShopData data)
 {
     if (Tools.GetRemainAARewardTime(data.Base.CloseTimeStamp) <= 0)
     {
         return null;
     }
     if (this.RewardCheckBtnPrefab == null)
     {
         this.RewardCheckBtnPrefab = Res.LoadGUI("GUI/GUIRewardCheckBtn");
     }
     if (this.RewardCheckBtnPrefab == null)
     {
         global::Debug.LogError(new object[]
         {
             "Res.Load GUI/GUIRewardCheckBtn error"
         });
         return null;
     }
     GameObject gameObject = Tools.AddChild(this.mTabBtnsTable.gameObject, this.RewardCheckBtnPrefab);
     GUIRewardCheckBtn gUIRewardCheckBtn = gameObject.AddComponent<GUIRewardCheckBtn>();
     gUIRewardCheckBtn.InitWithBaseScene(data);
     gUIRewardCheckBtn.IsShowMark = !GUIReward.ActivityValueReview.Contains(data.Base.ID);
     GUIRewardCheckBtn expr_A3 = gUIRewardCheckBtn;
     expr_A3.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_A3.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnActivityShopBtnsChanged));
     return gUIRewardCheckBtn;
 }
 public virtual void Refresh(ActivityShopData activityShop)
 {
     if (activityShop == null)
     {
         return;
     }
     if (this.ActivityShop != null && this.ActivityShop.Base.ID == activityShop.Base.ID)
     {
         this.mActivityShopGrid.repositionNow = true;
     }
     else
     {
         this.ActivityShop = activityShop;
         LocalPlayer player = Globals.Instance.Player;
         this.ASData = player.ActivitySystem.GetActivityShopData(this.ActivityShop.Base.ID);
         MC2S_GetActivityShopData mC2S_GetActivityShopData = new MC2S_GetActivityShopData();
         mC2S_GetActivityShopData.Version = ((this.ASData != null) ? this.ASData.Version : 0u);
         mC2S_GetActivityShopData.ActivityID = this.ActivityShop.Base.ID;
         Globals.Instance.CliSession.Send(751, mC2S_GetActivityShopData);
         this.mActivityShopGrid.SetDragAmount(0f, 0f);
         this.mActivityShopGrid.ClearData();
         this.mActivityShopGrid.repositionNow = true;
     }
 }