private void OnCheckItemEnable(CUIEvent uiEvent)
        {
            if (this._curActivity == null)
            {
                return;
            }
            int srcWidgetIndexInBelongedList   = uiEvent.m_srcWidgetIndexInBelongedList;
            ListView <ActivityPhase> phaseList = this._curActivity.PhaseList;
            bool flag = false;

            if (srcWidgetIndexInBelongedList >= 0 && srcWidgetIndexInBelongedList < phaseList.Count)
            {
                CheckInPhase checkInPhase = phaseList[srcWidgetIndexInBelongedList] as CheckInPhase;
                bool         marked       = checkInPhase.Marked;
                bool         readyForGet  = checkInPhase.ReadyForGet;
                if (readyForGet)
                {
                    this._availablePhase = checkInPhase;
                }
                uint     gameVipDoubleLv = checkInPhase.GetGameVipDoubleLv();
                CUseable useable         = checkInPhase.GetUseable(0);
                if (useable != null)
                {
                    Transform transform = uiEvent.m_srcWidget.transform;
                    if (transform != null)
                    {
                        this.SetItem(useable, transform, marked, readyForGet, gameVipDoubleLv, srcWidgetIndexInBelongedList);
                    }
                }
                if (flag || readyForGet)
                {
                }
            }
        }
Exemple #2
0
        private void UpdateCheckView()
        {
            if (this._curActivity != null)
            {
                ListView <ActivityPhase> phaseList = this._curActivity.PhaseList;
                Transform transform = this._form.gameObject.transform.FindChild("Panel/ItemContainer");
                bool      flag      = false;
                for (int i = 0; i < phaseList.get_Count(); i++)
                {
                    CheckInPhase checkInPhase = phaseList.get_Item(i) as CheckInPhase;
                    bool         marked       = checkInPhase.Marked;
                    bool         readyForGet  = checkInPhase.ReadyForGet;
                    if (readyForGet)
                    {
                        this._availablePhase = checkInPhase;
                    }
                    uint     gameVipDoubleLv = checkInPhase.GetGameVipDoubleLv();
                    CUseable useable         = checkInPhase.GetUseable(0);
                    if (useable != null)
                    {
                        GameObject gameObject = transform.FindChild(string.Format("itemCell{0}", i + 1)).gameObject;
                        if (gameObject != null)
                        {
                            this.SetItem(useable, gameObject, marked, readyForGet, gameVipDoubleLv);
                        }
                    }
                    if (!flag && readyForGet)
                    {
                        flag = true;
                    }
                }
                Transform transform2 = this._form.gameObject.transform.FindChild("Panel/BtnCheck");
                CUICommonSystem.SetButtonEnable(transform2.GetComponent <Button>(), flag, flag, true);
                Transform transform3 = this._form.gameObject.transform.FindChild("Panel/MeinvPic");
                MonoSingleton <BannerImageSys> .GetInstance().TrySetCheckInImage(transform3.gameObject.GetComponent <Image>());

                Transform transform4 = this._form.gameObject.transform.FindChild("Panel/Title/Text");
                transform4.gameObject.GetComponent <Text>().text = Singleton <CTextManager> .get_instance().GetText("SevenCheckIn_Title");

                Text component = this._form.gameObject.transform.FindChild("Panel/Desc").gameObject.GetComponent <Text>();
                component.text = Singleton <CTextManager> .get_instance().GetText("SevenCheckIn_Desc");

                DateTime dateTime  = Utility.ToUtcTime2Local(this._curActivity.StartTime);
                DateTime dateTime2 = Utility.ToUtcTime2Local(this._curActivity.CloseTime);
                string   text      = string.Format("{0}.{1}.{2}", dateTime.get_Year(), dateTime.get_Month(), dateTime.get_Day());
                string   text2     = string.Format("{0}.{1}.{2}", dateTime2.get_Year(), dateTime2.get_Month(), dateTime2.get_Day());
                string   text3     = Singleton <CTextManager> .get_instance().GetText("SevenCheckIn_Date", new string[]
                {
                    text,
                    text2
                });

                Text component2 = this._form.gameObject.transform.FindChild("Panel/Date").gameObject.GetComponent <Text>();
                component2.text = text3;
            }
        }
 public CheckInActivity(ActivitySys mgr, ResWealCheckIn config) : base(mgr, config.stCommon)
 {
     this._config = config;
     for (ushort num = 0; num < this._config.wDays; num += 1)
     {
         CheckInPhase ap = new CheckInPhase(this, (uint)num, this._config.astReward[(int)num]);
         base.AddPhase(ap);
     }
     this._lastCheckTime     = 0u;
     this._curFillPriceIndex = 0;
 }
Exemple #4
0
 public CheckInActivity(ActivitySys mgr, ResWealCheckIn config) : base(mgr, config.stCommon)
 {
     this._config = config;
     for (ushort i = 0; i < this._config.wDays; i = (ushort)(i + 1))
     {
         CheckInPhase ap = new CheckInPhase(this, i, this._config.astReward[i]);
         base.AddPhase(ap);
     }
     this._lastCheckTime     = 0;
     this._curFillPriceIndex = 0;
 }
        private void OnLeftUIItemEnable(CUIEvent uiEvent)
        {
            if (this._curActivity == null)
            {
                return;
            }
            int srcWidgetIndexInBelongedList   = uiEvent.m_srcWidgetIndexInBelongedList;
            ListView <ActivityPhase> phaseList = this._curActivity.PhaseList;
            Transform transform = uiEvent.m_srcWidget.transform;
            int       num       = this.m_DisplayIndex.Length;

            if (num <= srcWidgetIndexInBelongedList)
            {
                return;
            }
            int num2 = this.m_DisplayIndex[srcWidgetIndexInBelongedList];

            num2--;
            if (num2 >= 0 && num2 < phaseList.Count)
            {
                CheckInPhase checkInPhase = phaseList[num2] as CheckInPhase;
                if (checkInPhase != null)
                {
                    bool marked      = checkInPhase.Marked;
                    bool readyForGet = checkInPhase.ReadyForGet;
                    if (readyForGet)
                    {
                        this._availablePhase = checkInPhase;
                    }
                    uint     gameVipDoubleLv = checkInPhase.GetGameVipDoubleLv();
                    CUseable useable         = checkInPhase.GetUseable(0);
                    if (useable != null && transform != null)
                    {
                        this.SetLeftItem(useable, transform, marked, readyForGet, gameVipDoubleLv, num2);
                    }
                }
            }
        }