sp;Color.FromArgb(0xff,backColor),LinearGradientMode.Vertical),path);
}
private void DrawText(Graphics g,bool xiacen)
{
Rectangle rect= this.ClientRectangle;
Rectangle rect1= this.ClientRectangle;
StringFormat stringFormat=new StringFormat();
stringFormat.Alignment=StringAlignment.Center;
stringFormat.LineAlignment=StringAlignment.Center;
rect.Y=this.ClientRectangle.Height/5;
if(xiacen)
{
rect.Y=rect.Y+4;
rect1.Y=rect1.Y+4;
}
Font font=this.Font;
if(mouseMove)
{
font=new Font(this.Font,FontStyle.Underline);
}
g.DrawString(this.Text,font,
new SolidBrush(Color.FromArgb(0x66,backColor)),rect,stringFormat);
g.DrawString(this.Text,font,new SolidBrush(this.ForeColor),rect1,stringFormat);
}
private void UserControl1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(XiaCen==false)
{
XiaCen=true;
this.Refresh();
}
}
private void UserControl1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(XiaCen==true)
{
XiaCen=false;
this.Refresh();
}
}
private void UserControl1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.FillRectangle(new SolidBrush(backColor),0,0,this.Width,this.Height);
e.Graphics.SmoothingMode=SmoothingMode.HighQuality;
e.Graphics.TextRenderingHint=TextRenderingHint.AntiAliasGridFit;
Rectangle rect=new Rectangle(0,0,this.Width,this.Height);
GraphicsPath ClientPath=GetGraphicsPath(rect);
e.Graphics.FillPath(new SolidBrush(backColor),ClientPath);
this.Region=new System.Drawing.Region(ClientPath);
DrawYinYing(e.Graphics,XiaCen);
DrawGaoLiang(e.Graphics,XiaCen);
DrawText(e.Graphics,XiaCen);
if(this.Focused)
{
e.Graphics.DrawPath(new Pen(Color.FromArgb(0x22,0xff,0xff,0xff), 3), ClientPath);
}
}
private void UserControl1_BackColorChanged(obj