private void initDesTime() { //2014.7.17 added if (LanguageConfigManager.Instance.getLanguage("notice19") == notice.getSample().activiteDesc) { title1.spriteName = "vip"; } else { title1.spriteName = "notice_xs"; } //desLabel.text = notice.getSample ().activiteDesc; if (notice.isTimeLimit()) { int[] time = notice.getShowTimeLimit(); if (time == null) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); return; } else { timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice02", TimeKit.dateToFormat(time [0], LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(time [1] - 1, LanguageConfigManager.Instance.getLanguage("notice04"))); } } else { timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice03"); } }
public void initActiveNotice(Notice notice) { this.activeNotice = notice as LadderHegemoneyActiveNotice; buttonChallenge.ladderNotice = this.activeNotice; if (this.activeNotice == null) { ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("ladderruleprize5"); return; } if (activeNotice.isTimeLimit()) { int[] time = activeNotice.getShowTimeLimit(); if (time == null) { ladderdescLabel.gameObject.SetActive(true); ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("s0140"); return; } ladderdescLabel.gameObject.SetActive(true); ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("ladderruleprize4", TimeKit.dateToFormat(time [0], LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(time [1] - 1, LanguageConfigManager.Instance.getLanguage("notice04"))); } else { ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("notice03"); } }
private void initDesTime() { if (notice.getSample().name == Language("notice12")) { desTitle1.spriteName = "notice_lj"; desTitle2.spriteName = "notice_cz"; } else if (notice.getSample().name == Language("notice13")) { desTitle1.spriteName = "notice_lj"; desTitle2.spriteName = "notice_xf"; } else if (notice.getSample().name == Language("notice15")) { desTitle1.spriteName = "notice_xs"; desTitle2.spriteName = "notice_cz"; } else if (notice.getSample().name == Language("notice20")) { desTitle1.spriteName = "notice_xs"; desTitle2.spriteName = "notice_xf"; } else if (notice.getSample().name == Language("notice16")) { desTitle1.spriteName = "notice_mr"; desTitle2.spriteName = "notice_cz"; } else if (notice.getSample().name == Language("notice17")) { desTitle1.spriteName = "notice_xs"; desTitle2.spriteName = "notice_dh"; } else if (notice.getSample().name == Language("notice18")) { desTitle1.spriteName = "notice_xs"; desTitle2.spriteName = "notice_qg"; } if (notice.isTimeLimit()) { int[] time = notice.getShowTimeLimit(); if (time == null) { timeLabel.gameObject.SetActive(true); timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); return; } timeLabel.gameObject.SetActive(true); timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice02", TimeKit.dateToFormat(time[0], LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(time[1] - 1, LanguageConfigManager.Instance.getLanguage("notice04"))); } else { timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice03"); } }
public void showTime() { int time = ServerTimeKit.getSecondTime(); if (exchange.getStartTime() == 0 && exchange.getEndTime() == 0) { timeLabel.text = ""; isActive = true; changeButton(); return; } //差多久开始 if (exchange.getStartTime() > time && exchange.getStartTime() > 0) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0137", TimeKit.dateToFormat(exchange.getStartTime(), LanguageConfigManager.Instance.getLanguage("notice05"))); isActive = false; changeButton(); return; } //过期移除 if (exchange.getEndTime() < time && exchange.getEndTime() > 0) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); isActive = false; changeButton(); return; } if (exchange.getStartTime() == 0 && exchange.getEndTime() > 0 && time < exchange.getEndTime()) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0135", TimeKit.dateToFormat(exchange.getEndTime(), LanguageConfigManager.Instance.getLanguage("notice05"))); isActive = true; changeButton(); return; } if (exchange.getStartTime() > 0 && exchange.getEndTime() == 0 && time > exchange.getStartTime()) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0136"); isActive = true; changeButton(); return; } if (exchange.getStartTime() > 0 && exchange.getEndTime() > 0 && time > exchange.getStartTime() && time < exchange.getEndTime()) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0135", TimeKit.dateToFormat(exchange.getEndTime(), LanguageConfigManager.Instance.getLanguage("notice05"))); isActive = true; changeButton(); return; } }
/// <summary> /// 获得时间描述 /// </summary> public string getTimeDesc() { int nowTime = ServerTimeKit.getSecondTime(); ExamSample examSample = QuizManagerment.Instance.getExamSampleBySid(this); if (examSample == null) { return(LanguageConfigManager.Instance.getLanguage("notice_quiz01")); //活动已经结束 } 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 detailStartTime = activeTime.getDetailStartTime(); //具体结束时间 int detailEndTime = activeTime.getDetailEndTime(); if (detailStartTime < nowTime && detailEndTime > nowTime && examSample.getAwardType == 1) { return(LanguageConfigManager.Instance.getLanguage("notice09")); //可以答题 } else if (DateKit.isInSameDay(detailStartTime, nowTime) && detailStartTime > nowTime) { return(LanguageConfigManager.Instance.getLanguage("notice08", TimeKit.dateToFormat(detailStartTime, LanguageConfigManager.Instance.getLanguage("notice05")))); //尚未开启 } else if (activeTime.getIsFinish()) { return(LanguageConfigManager.Instance.getLanguage("notice_quiz01")); //活动已经结束 } else if (detailEndTime < nowTime) { return(LanguageConfigManager.Instance.getLanguage("notice_quiz01")); //活动已经结束 } else { return(LanguageConfigManager.Instance.getLanguage("notice_quiz01")); //活动已经结束 } }
private void initDesTime() { if (notice.isTimeLimit()) { int[] time = notice.getShowTimeLimit(); if (time == null) { timeLabel.gameObject.SetActive(true); timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); return; } timeLabel.gameObject.SetActive(true); timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice02", TimeKit.dateToFormat(time [0], LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(time [1] - 1, LanguageConfigManager.Instance.getLanguage("notice04"))); } else { timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice03"); } }
public void creatDes() { string timeInfo = TimeKit.dateToFormat(time, LanguageConfigManager.Instance.getLanguage("notice06")); string vipInfo = vipLevel > 0 ? LanguageConfigManager.Instance.getLanguage("laddersTip_06", vipLevel.ToString()) : string.Empty; /* * laddersTip_04|【%1】成功防守了玩家[EEFF00]%2[-]%3的挑战,名次不变[url=%4][00EEDD]【[u]重播[/u]】[-][/url]; * laddersTip_05|【%1】被玩家[EEFF00]%2[-]%3打败,名次降低到[EEFF00]%4[-]名[url=%5][00EEDD]【[u]重播[/u]】[-][/url]; */ if (isWin) { description = LanguageConfigManager.Instance.getLanguage("laddersTip_05", timeInfo, enemyName, vipInfo, rank.ToString()); } else { description = LanguageConfigManager.Instance.getLanguage("laddersTip_04", timeInfo, enemyName, vipInfo); } //description += LanguageConfigManager.Instance.getLanguage ("laddersTip_07"); }
public void initNoticeTime(Notice noticec) { this.notice = noticec as LadderHegemoneyNotice; if (notice.isTimeLimit()) { int[] time = this.notice.getShowTimeLimit(); if (time == null) { timeLabel.gameObject.SetActive(true); timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); return; } timeLabel.gameObject.SetActive(true); timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice02", TimeKit.dateToFormat(time [0], LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(time [1] - 1, LanguageConfigManager.Instance.getLanguage("notice04"))); } else { timeLabel.text = LanguageConfigManager.Instance.getLanguage("notice03"); } }
/// <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")))); } }
/// <summary> /// 获得日期 /// </summary> public string getDateTime(int secondTime) { return(TimeKit.dateToFormat(secondTime, LanguageConfigManager.Instance.getLanguage("notice04"))); }
public void showTime() { if (notice == null) { return; } int time = ServerTimeKit.getSecondTime(); int[] limitTimes = notice.getTimeLimit(); //过期移除 if (limitTimes == null) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); isActive = false; changeButton(); } else { int startTime = limitTimes [0]; int endTime = limitTimes [1]; //表示永久活动 if (startTime == 0 && endTime == 0) { timeLabel.text = ""; isActive = true; changeButton(); return; } //差多久开始 if (startTime > time && startTime > 0) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0137", TimeKit.dateToFormat(startTime, LanguageConfigManager.Instance.getLanguage("notice05"))); isActive = false; changeButton(); return; } //过期移除 if (endTime < time && endTime > 0) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0138"); isActive = false; changeButton(); return; } if (startTime == 0 && endTime > 0 && time < endTime) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0135", TimeKit.dateToFormat(endTime, LanguageConfigManager.Instance.getLanguage("notice05"))); isActive = true; setItemText(); changeButton(); return; } if (startTime > 0 && endTime == 0 && time > startTime) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0136"); isActive = true; changeButton(); return; } if (startTime > 0 && endTime > 0 && time > startTime && time < endTime) { timeLabel.text = LanguageConfigManager.Instance.getLanguage("s0135", TimeKit.dateToFormat(endTime, LanguageConfigManager.Instance.getLanguage("notice05"))); isActive = true; setItemText(); changeButton(); return; } } }