Ejemplo n.º 1
0
        /// <summary>
        /// Update the entire log shown at the moment.
        /// </summary>
        private void UpdateLog()
        {
            // Get 50 last log lines
            var filtered = LogLines
                           .Where(l => !HideHandledLines || !l.IsHandled)
                           .Select(l => l.Line)
                           .Reverse()
                           .Take(LinesToShow)
                           .Reverse()
                           .ToList();

            lbLogLines.Items.Clear();

            if (filtered.Count >= 1)
            {
                lbLogLines.Items.AddRange(filtered.ToArray());
            }
        }