private void IssueList_ListChanged(object sender, ListChangedEventArgs e)
        {
            var list = IssueList.ToArray();

            foreach (var item in list)
            {
                // If issue is unchecked or no longer a problem then...
                if (Warnings.Contains(item) && (!item.IsEnabled || !item.Severity.HasValue || item.Severity == IssueSeverity.None))
                {
                    // Remove from warnings list.
                    Warnings.Remove(item);
                }
                // If issue not found and problem found then...
                else if (!Warnings.Contains(item) && item.IsEnabled && item.Severity.HasValue && item.Severity.Value != IssueSeverity.None)
                {
                    // Add to warnings list.
                    Warnings.Add(item);
                }
            }
            // Get issues in progress.
            list = IssueList.Where(x => x.Status != IssueStatus.Idle).ToArray();
            var sb = new StringBuilder();

            foreach (var item in list)
            {
                if (sb.Length > 0)
                {
                    sb.Append(", ");
                }
                sb.AppendFormat("{0}/{1} {2}: {3}", IssueList.IndexOf(item), IssueList.Count, item.GetType().Name, item.Status);
            }
            StatusLabel.Text = sb.ToString();
            UpdateIgnoreAllButton();
            UpdateNoIssuesPanel();
        }
Beispiel #2
0
        private void IssueList_ListChanged(object sender, ListChangedEventArgs e)
        {
            // Get issues in progress.
            var list = IssueList.Where(x => x.Status != IssueStatus.Idle).ToArray();
            var sb   = new StringBuilder();

            foreach (var item in list)
            {
                if (sb.Length > 0)
                {
                    sb.Append(", ");
                }
                sb.AppendFormat("{0}/{1} {0}: {1}", IssueList.IndexOf(item), IssueList.Count, item.GetType().Name, item.Status);
            }
            StatusLabel.Text = sb.ToString();
        }