using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Diagnostics;
namespace EastSpider
{
/// <summary>
/// Summary description for VSNetButton.
/// </summary>
public class XPButton : System.Windows.Forms.Button
{
bool gotFocus = false;
bool mouseDown = false;
bool mouseEnter = false;
bool useDisableImage = true;
public XPButton()
{
SetStyle(ControlStyles.AllPaintingInWmPaint|ControlStyles.UserPaint|ControlStyles.Opaque, true);
}
public bool UseDisableImage
{
get
{
return useDisableImage;
}
set
{
useDisableImage = value;
}
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
Graphics g = pe.Graphics;
if ( mouseDown )
{
DrawSelectedState(g, ColorUtil.VSNetPressedColor);
return;
}
if (mouseEnter)
{
DrawSelectedState(g, ColorUtil.VSNetSelectionColor);
return;
}
if ( Enabled )
DrawNormalState(pe.Graphics);