Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        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;
            }
        }
        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;
            }
        }