public override void Remove() { if (HighlightingContext.StateHighlighting) { _context.Enqueue(delegate { this.BackColor = HighlightingContext.Colors[ListViewItemState.Removed]; this.ForeColor = PhUtils.GetForeColor(this.BackColor); _context.EnqueuePost(delegate { 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.EnqueuePost(delegate { this.BackColor = _normalColor; this.ForeColor = PhUtils.GetForeColor(this.BackColor); _state = ListViewItemState.Normal; }); } else { this.BackColor = _normalColor; } }
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.EnqueuePost(() => { this.BackColor = this._normalColor; this.ForeColor = PhUtils.GetForeColor(this.BackColor); this._state = ListViewItemState.Normal; }); } else { this.BackColor = _normalColor; } }