public void OnLoginOpen(CUIEvent uiEvent)
        {
            this.m_SelectIDx = 0;
            if (uiEvent == null)
            {
                this.m_bOpenLink = false;
            }
            else
            {
                this.m_bOpenLink = true;
            }
            if (this._form == null)
            {
                bool flag = false;
                ListView <Activity> activityList = Singleton <ActivitySys> .GetInstance().GetActivityList((Activity actv) => actv.Entrance == RES_WEAL_ENTRANCE_TYPE.RES_WEAL_ENTRANCE_TYPE_14CHECK);

                if (activityList != null && activityList.Count > 0)
                {
                    this._curActivity = (CheckInActivity)activityList[0];
                    ListView <ActivityPhase> phaseList = this._curActivity.PhaseList;
                    for (int i = 0; i < phaseList.Count; i++)
                    {
                        if (phaseList[i].ReadyForGet)
                        {
                            this.m_SelectIDx = i;
                            flag             = true;
                            break;
                        }
                    }
                    if (flag || this.m_bOpenLink)
                    {
                        this._curActivity.OnMaskStateChange += new Activity.ActivityEvent(this.ActivityEvent);
                        this._curActivity.OnTimeStateChange += new Activity.ActivityEvent(this.ActivityEvent);
                        this._form = Singleton <CUIManager> .GetInstance().OpenForm(this.FormName, false, true);

                        this.InitUI();
                        this.InitLeftUI();
                        if (this._form != null)
                        {
                            Transform transform = this._form.gameObject.transform.FindChild("Panel/BtnCheck");
                            CUICommonSystem.SetButtonEnable(transform.GetComponent <Button>(), flag, flag, true);
                        }
                    }
                    else
                    {
                        this._curActivity = null;
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected void OnCloseSevenDayCheckForm(CUIEvent uiEvent)
        {
            if (this._curActivity != null)
            {
                this._curActivity.OnMaskStateChange -= new Assets.Scripts.GameSystem.Activity.ActivityEvent(this.ActivityEvent);
                this._curActivity.OnTimeStateChange -= new Assets.Scripts.GameSystem.Activity.ActivityEvent(this.ActivityEvent);
                this._curActivity = null;
            }
            if (this._form != null)
            {
                Singleton <CUIManager> .GetInstance().CloseForm(this.FormName);

                this._form = null;
            }
        }
Exemplo n.º 3
0
        protected void OnCloseSevenDayCheckForm(CUIEvent uiEvent)
        {
            if (this._curActivity != null)
            {
                this._curActivity.OnMaskStateChange -= new Activity.ActivityEvent(this.ActivityEvent);
                this._curActivity.OnTimeStateChange -= new Activity.ActivityEvent(this.ActivityEvent);
                this._curActivity = null;
            }
            if (this._form != null)
            {
                Singleton <CUIManager> .GetInstance().CloseForm(this.FormName);

                this._form = null;
            }
            Singleton <Day14CheckSystem> .GetInstance().OnLoginOpen(null);
        }
Exemplo n.º 4
0
        protected void OnOpenSevenDayCheckForm(CUIEvent uiEvent)
        {
            if (this._form == null)
            {
                ListView <Activity> activityList = Singleton <ActivitySys> .GetInstance().GetActivityList((Activity actv) => actv.Entrance == 0);

                if (activityList != null && activityList.get_Count() > 0)
                {
                    this._form = Singleton <CUIManager> .GetInstance().OpenForm(this.FormName, false, true);

                    this._curActivity = (CheckInActivity)activityList.get_Item(0);
                    this._curActivity.OnMaskStateChange += new Activity.ActivityEvent(this.ActivityEvent);
                    this._curActivity.OnTimeStateChange += new Activity.ActivityEvent(this.ActivityEvent);
                    this.UpdateCheckView();
                }
            }
        }
Exemplo n.º 5
0
        protected void OnLoginOpen(CUIEvent uiEvent)
        {
            if (this._form == null)
            {
                bool flag = false;
                ListView <Activity> activityList = Singleton <ActivitySys> .GetInstance().GetActivityList((Activity actv) => actv.Entrance == 0);

                if (activityList != null && activityList.get_Count() > 0)
                {
                    this._curActivity = (CheckInActivity)activityList.get_Item(0);
                    ListView <ActivityPhase> phaseList = this._curActivity.PhaseList;
                    for (int i = 0; i < phaseList.get_Count(); i++)
                    {
                        if (phaseList.get_Item(i).ReadyForGet)
                        {
                            flag = true;
                            break;
                        }
                    }
                    if (flag)
                    {
                        this._curActivity.OnMaskStateChange += new Activity.ActivityEvent(this.ActivityEvent);
                        this._curActivity.OnTimeStateChange += new Activity.ActivityEvent(this.ActivityEvent);
                        this._form = Singleton <CUIManager> .GetInstance().OpenForm(this.FormName, false, true);

                        this.UpdateCheckView();
                    }
                    else
                    {
                        this._curActivity = null;
                    }
                }
                if (!flag)
                {
                    Singleton <Day14CheckSystem> .GetInstance().OnLoginOpen(null);
                }
            }
        }