mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
7bd28e4357
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2304 21ef857c-d57f-4fe0-8362-d861dc6d29cd
31 lines
751 B
C#
31 lines
751 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
|
|
namespace ProcessHacker.Base
|
|
{
|
|
public sealed class ProcessHighlightingManager
|
|
{
|
|
public delegate bool FilterDelegate(int pid, ref Color color);
|
|
|
|
private Dictionary<string, FilterDelegate> _filters =
|
|
new Dictionary<string, FilterDelegate>();
|
|
|
|
public void AddFilter(string name, FilterDelegate tabPage)
|
|
{
|
|
_filters.Add(name, tabPage);
|
|
}
|
|
|
|
public IEnumerable<FilterDelegate> GetFilters()
|
|
{
|
|
return _filters.Values;
|
|
}
|
|
|
|
public void RemoveFilter(string name)
|
|
{
|
|
_filters.Remove(name);
|
|
}
|
|
}
|
|
}
|