You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Drawing.Drawing2D;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace BiskLog_Point_Of_Sale.Classes
|
|
{
|
|
class gradientPanel : Panel
|
|
{
|
|
Color TopColor;
|
|
Color BottomColor;
|
|
public Color ColorTop
|
|
{
|
|
get { return TopColor; }
|
|
|
|
set
|
|
{
|
|
TopColor = value;
|
|
Invalidate();
|
|
}
|
|
}
|
|
public Color ColorBottom
|
|
{
|
|
get { return BottomColor; }
|
|
|
|
set
|
|
{
|
|
BottomColor = value;
|
|
Invalidate();
|
|
}
|
|
}
|
|
public gradientPanel()
|
|
{
|
|
DoubleBuffered = true;
|
|
}
|
|
protected override void OnPaint(PaintEventArgs e)
|
|
{
|
|
LinearGradientBrush lgb = new
|
|
LinearGradientBrush(this.ClientRectangle, this.ColorTop,
|
|
this.ColorBottom, 90F);
|
|
Graphics g = e.Graphics;
|
|
g.FillRectangle(lgb, this.ClientRectangle);
|
|
base.OnPaint(e);
|
|
}
|
|
}
|
|
}
|
|
|