public override void Remove() { if (HighlightingContext.StateHighlighting) { _context.Enqueue(() => { this.BackColor = HighlightingContext.Colors[ListViewItemState.Removed]; this.ForeColor = PhUtils.GetForeColor(this.BackColor); this._context.EnqueuePost(this.BaseRemove); }); } else { base.Remove(); } }
public HighlightedListViewItem(HighlightingContext context, string text, bool highlight) : base(text) { _context = context; if (HighlightingContext.StateHighlighting && highlight) { this.BackColor = HighlightingContext.Colors[ListViewItemState.New]; this.ForeColor = PhUtils.GetForeColor(this.BackColor); _state = ListViewItemState.New; _context.Enqueue(delegate { this.BackColor = _normalColor; this.ForeColor = PhUtils.GetForeColor(this.BackColor); _state = ListViewItemState.Normal; }); } else { this.BackColor = _normalColor; } }