private void DrawSortMark(Graphics gr, Rectangle bounds, int x)
{
int y = bounds.Y + bounds.Height / 2 - 2;
x = Math.Max(x, bounds.X + SortOrderMarkMargin);
int w2 = SortMarkSize.Width / 2;
if (SortOrder == SortOrder.Ascending)
{
Point[] points = new Point[] { new Point(x, y), new Point(x + SortMarkSize.Width, y), new Point(x + w2, y + SortMarkSize.Height) };
gr.FillPolygon(SystemBrushes.ControlDark, points);
}
else if (SortOrder == SortOrder.Descending)
{
Point[] points = new Point[] { new Point(x - 1, y + SortMarkSize.Height), new Point(x + SortMarkSize.Width, y + SortMarkSize.Height), new Point(x + w2, y - 1) };
gr.FillPolygon(SystemBrushes.ControlDark, points);
}
}