private void lvIcons_DrawItem(object sender, DrawListViewItemEventArgs e) {
e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
e.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
if ((e.State & ListViewItemStates.Hot) != 0 && (e.State & ListViewItemStates.Selected) == 0) {
this._ItemHoverRenderer.DrawBackground(e.Graphics, e.Bounds);
} else if ((e.State & ListViewItemStates.Hot) != 0 && (e.State & ListViewItemStates.Selected) != 0) {
this._Selectedx2Renderer.DrawBackground(e.Graphics, e.Bounds);
} else if ((e.State & ListViewItemStates.Selected) != 0) {
this._ItemSelectedRenderer.DrawBackground(e.Graphics, e.Bounds);
} else {
e.DrawBackground();
}
var ico = _Icons[(int)e.Item.Tag].Icon;
if (ico.Width <= 48) {
e.Graphics.DrawIcon(_Icons[(int)e.Item.Tag].Icon,
e.Bounds.X + (e.Bounds.Width - ico.Width) / 2, e.Bounds.Y + (e.Bounds.Height - ico.Height) / 2 - 5);
}
e.DrawText(TextFormatFlags.Bottom | TextFormatFlags.HorizontalCenter | TextFormatFlags.WordEllipsis);
}