//错误的信息保存起来,用来输出在手机屏幕上 static public void Log(params object[] objs) { if (isNotPrintAndRecord) { return; } StringBuilder strBuild = new StringBuilder(); for (int i = 0; i < objs.Length; ++i) { if (i == 0) { strBuild.Append(objs[i].ToString()); } else { strBuild.Append(LanUtil.StringProfile(", ", objs[i].ToString())); } } if (Application.isPlaying) { if (mLines.Count > 20) { mLines.RemoveAt(0); } string str = strBuild.ToString(); mLines.Add(str); mWriteTxt.Add(str); } }
/// <summary> /// 充值界面 显示开服活动截止时间: xxx年xx月xx日 23时59分 /// </summary> /// <param name="sec"></param> /// <returns></returns> public string abortSeconds(int sec) { DateTime t = DateTime.Now; DateTime d1 = DateTime.Parse(t.ToString("每天")); DateTime d2 = new DateTime(1970, 1, 1); double d = d1.Subtract(d2).TotalMilliseconds; d += sec * 1000; DateTime time = DateTime.MinValue; DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(d2); time = startTime.AddMilliseconds(d); return(LanUtil.StringProfile(time.ToString("每天"), " 23", "时", "59", "分")); }