protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
switch (this._mouseState)
{
case EMouseState.Move:
using (Image hotLine = AssemblyHelper.GetImage("QQ.TextBox.move.png"))
{
DrawHelper.RendererBackground(g, this.ClientRectangle, hotLine, true);
}
break;
default:
DrawHelper.RendererBackground(g, this.ClientRectangle, this._borderImage, true);
break;
}
if (this._icon != null)
{
Rectangle iconRect = this.IconRect;
if (this._iconMouseState == EMouseState.Down)
{
iconRect.X += 1;
iconRect.Y += 1;
}
g.DrawImage(this._icon, iconRect, 0, 0, this._icon.Width, this._icon.Height, GraphicsUnit.Pixel);
}
}