示例#1
0
 private void DrawVistaBackground(Graphics gr, Rectangle drawbounds, Color bgc, Color bc)
 {
     GradientFill.DrawVistaGradient(gr, bgc, drawbounds, FillDirection.Vertical);
     using (Pen pen = new Pen(bc))
     {
         gr.DrawLine(pen, drawbounds.X, drawbounds.Y - 1, drawbounds.Right - 1, drawbounds.Y - 1);
         gr.DrawLine(pen, drawbounds.X, drawbounds.Bottom, drawbounds.Right - 1, drawbounds.Bottom);
         gr.DrawLine(pen, drawbounds.X - 1, drawbounds.Y, drawbounds.X - 1, drawbounds.Bottom - 1);
         gr.DrawLine(pen, drawbounds.Right, drawbounds.Y, drawbounds.Right, drawbounds.Bottom - 1);
     }
 }
示例#2
0
 public void DrawVistaGradient(Graphics gr, Rectangle rc)
 {
     GradientFill.DrawVistaGradient(gr, this.StartColor, rc, this.FillDirection);
 }