public override bool isValid() { //显示规则策划定 activeTime = getActiveTime(); if (activeTime.getIsFinish()) { return(false); } if (activeTime.getEndTime() == 0) { return(true); } int now = ServerTimeKit.getSecondTime(); return(activeTime.getPreShowTime() < now && (now < activeTime.getEndTime())); }
private void updateNoticeWindow() { int currentSecond = ServerTimeKit.getCurrentSecond(); if (currentSecond == ALLSECONDSOFDAY && ServerTimeKit.getSecondTime() < activeTime.getEndTime()) //凌晨0点刷新界面 { initButton(); } if (ServerTimeKit.getSecondTime() >= activeTime.getEndTime() || !notice.isValid()) //活动结束,刷新整个活动界面 { if (UiManager.Instance.getWindow <NoticeWindow>() != null) { UiManager.Instance.getWindow <NoticeWindow>().initTopButton(); } timer.stop(); } }
private void updateNotice() { if (ServerTimeKit.getSecondTime() > activeTime1.getEndTime()) { if (UiManager.Instance.getWindow <NoticeWindow>() != null) { UiManager.Instance.getWindow <NoticeWindow>().initTopButton(); } timer1.stop(); } }
public override int[] getShowTimeLimit() { activeTime = getActiveTime(); if (activeTime.getIsFinish()) { return(null); } return(new int[] { activeTime.getStartTime(), activeTime.getEndTime() }); }
public bool IsCanShow(int activeID) { DoubleRMBInfo info = NoticeActiveManagerment.Instance.getActiveInfoBySid(activeID) as DoubleRMBInfo; //if (info.state) //return false; ActiveTime activeTime = ActiveTime.getActiveTimeByID(NoticeSampleManager.Instance.getNoticeSampleBySid(activeID).timeID); int now = ServerTimeKit.getSecondTime(); if (now > activeTime.getPreShowTime() && now < activeTime.getStartTime() && activeTime.getStartTime() != -1) { return(true); } if (activeTime.getIsFinish()) { return(false); } if (now < activeTime.getPreShowTime() || (now > activeTime.getEndTime() && activeTime.getEndTime() != -1)) { return(false); } return(true); }
public override bool isValid() { NoticeSample sample = NoticeSampleManager.Instance.getNoticeSampleBySid(sid); activeTime = ActiveTime.getActiveTimeByID(sample.timeID); if (activeTime.getIsFinish()) { return(false); } if (activeTime.getEndTime() == 0) { return(true); } int now = ServerTimeKit.getSecondTime(); return(now >= activeTime.getStartTime() && now <= activeTime.getDetailEndTime() && hasInfo()); }
/// <summary> /// 得到结束时间 /// </summary> public string getEndTime() { TimeInfoSample tsample = TimeConfigManager.Instance.getTimeInfoSampleBySid(getSample().timeID); if (activeTime == null) { activeTime = ActiveTime.getActiveTimeByType(tsample); //activeTime.initTime (ServerTimeKit.getSecondTime ()); } else { activeTime.doRefresh(); } //具体结束时间 int endTime = activeTime.getEndTime(); //+ServerTimeKit.onlineTime; System.DateTime date = TimeKit.getDateTime(endTime); return(LanguageConfigManager.Instance.getLanguage("s0125", date.Month.ToString(), date.Day.ToString())); }
private void updateTime() { activeTime = (notice as ConsumeRebateNotice).activeTime; activeTime.doRefresh(); int now = ServerTimeKit.getSecondTime(); if (activeTime.getEndTime() == 0) { timeLabel.text = Language("notice03"); } else if (now < activeTime.getDetailStartTime()) { //活动还未开启 timeNoOpen.text = Language("ConsumeRebate_05", TimeKit.timeTransformDHMS(activeTime.getDetailStartTime() - now)); timeLabel.gameObject.SetActive(false); offect.SetActive(false); noOpenObj.SetActive(true); //timeLabel.text = Language ("ConsumeRebate_05", TimeKit.timeTransformDHMS (activeTime.getDetailStartTime () - now)); } else if (activeTime.getDetailStartTime() <= now && now < activeTime.getDetailEndTime()) { timeLabel.gameObject.SetActive(true); offect.SetActive(true); offect.transform.localPosition = new Vector3(0f, 17f, 0f); noOpenObj.SetActive(false); timeLabel.text = Language("ConsumeRebate_06", TimeKit.timeTransformDHMS(activeTime.getDetailEndTime() - now)); } else { timeLabel.text = Language("s0211"); timeLabel.gameObject.SetActive(true); offect.SetActive(true); offect.transform.localPosition = new Vector3(0f, 17f, 0f); noOpenObj.SetActive(false); OnDisable(); } }
/// <summary> /// 获得答题活动开放时间 /// </summary> public string getOpenTimeDesc() { SidNoticeContent content = getSample().content as SidNoticeContent; TimeInfoSample tsample = TimeConfigManager.Instance.getTimeInfoSampleBySid(getSample().timeID); if (activeTime == null) { activeTime = ActiveTime.getActiveTimeByType(tsample); activeTime.initTime(ServerTimeKit.getSecondTime()); } else { activeTime.doRefresh(); } //具体开始时间 int startTime = activeTime.getStartTime(); //具体结束时间 int endTime = activeTime.getEndTime(); DateTime dt = TimeKit.getDateTime(endTime); int currTime = dt.Hour * 3600 + dt.Minute * 60 + dt.Second; if (currTime == 0) { endTime -= 1; } if (DateKit.isInSameDay(startTime, endTime)) { return(LanguageConfigManager.Instance.getLanguage("notice11", TimeKit.dateToFormat(startTime, LanguageConfigManager.Instance.getLanguage("notice04")))); } else { return(LanguageConfigManager.Instance.getLanguage("notice02", TimeKit.dateToFormat(startTime, LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(endTime, LanguageConfigManager.Instance.getLanguage("notice04")))); } }