public class FormBrushClass
{
FormBrush FB=new FormBrush();
public FormBrush FormBr
{
get{return FB;}
set{FB=value;}
}
}
/// <summary>
/// Colors the BackGround of the Form.
/// </summary>
[ TypeConverter(typeof(ExpandableObjectConverter)) ]
public class FormBrush
{
Color c1= SystemColors.Control;
Color c2= SystemColors.Control;
Rectangle fiStartEndArea=new Rectangle(0,0,100,100);
int rot=20;
//-----------------------------
public FormBrush(Color color1, Color color2, Rectangle fillStartEndArea, int rotation)
{
Color1= color1;
Color2= color2;
FillStartEndArea= fillStartEndArea;
Rotation= rotation;
}
public FormBrush(Color color1)
{
Color1= color1;
}
public FormBrush()
{
}
//-----------------------------
public Color Color1
{
get{return c1;}
set{c1=value;}
}
//-----------------------------
public Color Color2
{
get{return c2;}
set{c2=value;}
}
//-----------------------------
public Rectangle FillStartEndArea
{
get{return fiStartEndArea;}
set{fiStartEndArea=value;}
}
//-----------------------------
public int Rotation
{
get{return rot;}
set{rot=value;}
}
} //end class FormBrush
//----------------------------
FormBrush backgrdBrush=null;
/// <summary>
/// A brush to paint the background any color you want. Will always be behind the image.
/// </summary>
public FormBrush BackgrdBrush
{
get{return backgrdBrush;}
set{backgrdBrush=value; this.Invalidate();}
}