public void FillRectGradient(Rectangle rect, float pct1, Color c1, Color c2, float pct2, Color c3, Color c4)
{
Rectangle rect1 = new Rectangle(rect.X, rect.Y, rect.Width, (int)Math.Ceiling((float)(rect.Height * pct1)));
Rectangle rect2 = new Rectangle(rect.X, rect.Y + rect1.Height-1, rect.Width, (int)Math.Ceiling((float)(rect.Height *pct2))+1 );
System.Drawing.Drawing2D.LinearGradientBrush tmpbrush = new System.Drawing.Drawing2D.LinearGradientBrush(rect2, c3, c4, System.Drawing.Drawing2D.LinearGradientMode.Vertical);
dev.graph.FillRectangle(tmpbrush, rect2);
tmpbrush.Dispose();
tmpbrush = new System.Drawing.Drawing2D.LinearGradientBrush(rect1, c1, c2, System.Drawing.Drawing2D.LinearGradientMode.Vertical);
dev.graph.FillRectangle(tmpbrush, rect1);
tmpbrush.Dispose();
}