예제 #1
0
        public void Update()
        {
            foreach (var entry in SAMLog.Entries.Reverse().TakeWhile(p => p != _lastReadEntry).Reverse())
            {
                _lines.Add(CreateLine(entry));
                _lastReadEntry = entry;
                DebugSettings.SetManual("DebugTextDisplay", true);
            }

            while (_lines.Count(l => l.IsAlive) > MAX_LINE_COUNT)
            {
                var d = _lines.Where(l => l.IsAlive && l.Lifetime < 60).OrderBy(l => l.Lifetime).FirstOrDefault();
                if (d == null)
                {
                    break;
                }
                d.IsAlive = false;
            }
        }
예제 #2
0
 public DebugTextDisplayLine AddTabularLine(string debugSettingsKey, Func <List <string> > texts)
 {
     return(AddLine(new DebugTextDisplayLine(texts, () => DebugSettings.Get(debugSettingsKey))));
 }
예제 #3
0
 public DebugTextDisplayLine AddLine(string debugSettingsKey, Func <string> text)
 {
     return(AddLine(new DebugTextDisplayLine(text, () => DebugSettings.Get(debugSettingsKey))));
 }