public void OnSecondPass() { bool flag = false; for (int i = 1; i < DataReader <JinJiKaiFangShiJian> .DataList.get_Count() + 1; i++) { JinJiKaiFangShiJian jinJiKaiFangShiJian = DataReader <JinJiKaiFangShiJian> .Get(i); DateTime dateTime = DateTime.Parse(TimeManager.Instance.PreciseServerTime.ToString("yyyy-MM-dd ") + jinJiKaiFangShiJian.openTime); DateTime dateTime2 = dateTime.AddSeconds((double)jinJiKaiFangShiJian.time); if (TimeManager.Instance.PreciseServerTime < dateTime) { this.TextTips.set_text(string.Format(GameDataUtils.GetChineseContent(513611, false), dateTime.ToString("HH:mm"), string.Empty)); flag = true; break; } if (TimeManager.Instance.PreciseServerTime < dateTime2) { this.TextTips.set_text(string.Format(GameDataUtils.GetChineseContent(513612, false), dateTime2.ToString("HH:mm"), string.Empty)); flag = true; break; } } if (!flag) { DateTime dateTime3 = DateTime.Parse(TimeManager.Instance.PreciseServerTime.AddDays(1.0).ToString("yyyy-MM-dd ") + DataReader <JinJiKaiFangShiJian> .Get(1).openTime); this.TextTips.set_text(string.Format(GameDataUtils.GetChineseContent(513611, false), dateTime3.get_Hour(), (dateTime3.get_Minute() != 0) ? dateTime3.get_Minute().ToString() : "00")); } }
public bool HasOpenedUrgentTask() { for (int i = 1; i < DataReader <JinJiKaiFangShiJian> .DataList.get_Count() + 1; i++) { JinJiKaiFangShiJian jinJiKaiFangShiJian = DataReader <JinJiKaiFangShiJian> .Get(i); DateTime dateTime = DateTime.Parse(TimeManager.Instance.PreciseServerTime.ToString("yyyy-MM-dd ") + jinJiKaiFangShiJian.openTime); DateTime dateTime2 = dateTime.AddSeconds((double)jinJiKaiFangShiJian.time); if (dateTime < TimeManager.Instance.PreciseServerTime && TimeManager.Instance.PreciseServerTime < dateTime2) { return(true); } } return(false); }