using System; using System.Collections.Generic; using System.Linq; using System.Text; using SysBaseLibs; namespace SysDataLibs { public class YTErrorList { private List _ErrorTimes = new List(); public List ErrorTimes { get { return _ErrorTimes; } set { _ErrorTimes = value; } } public bool IsCanStop { get { bool lbRetval = false; try { if (ErrorTimes.Count > 20) { TimeSpan ts = Utils.DateDiff(ErrorTimes[ErrorTimes.Count - 1], ErrorTimes[ErrorTimes.Count - 20]); if (ts.Hours <= 2) { lbRetval = true; } for (int i = 0; i < ErrorTimes.Count - 20; i++) { ErrorTimes.RemoveAt(i); } } } catch { } return lbRetval; } } } }