private void DrawTabBorder(GraphicsPath path, int index, Graphics graphics)
{
graphics.SmoothingMode = SmoothingMode.HighQuality;
Color borderColor;
if (index == this.SelectedIndex) {
borderColor = this._StyleProvider.BorderColorSelected;
} else if (this._StyleProvider.HotTrack && index == this.ActiveIndex) {
borderColor = this._StyleProvider.BorderColorHot;
} else {
borderColor = this._StyleProvider.BorderColor;
}
using (Pen borderPen =new Pen(borderColor)){
graphics.DrawPath(borderPen, path);
}
}