ab56a9bcf7
SVN-Revision: r240
55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Lskj.ProductDynamic.Controls
|
|
{
|
|
public partial class SimpleButton : UserControl
|
|
{
|
|
/// <summary>
|
|
/// this button控件
|
|
/// </summary>
|
|
private DevExpress.XtraEditors.SimpleButton _simpleButton;
|
|
public DevExpress.XtraEditors.SimpleButton simpleButton
|
|
{
|
|
get
|
|
{
|
|
_simpleButton = this.simpleBtn;
|
|
return _simpleButton;
|
|
}
|
|
set { _simpleButton = value; }
|
|
}
|
|
/// <summary>
|
|
/// 默认颜色
|
|
/// </summary>
|
|
private Color emptyColor;
|
|
public SimpleButton()
|
|
{
|
|
InitializeComponent();
|
|
this.Load += new EventHandler(OnSimpleButton_Load);
|
|
this.simpleButton.MouseMove += new MouseEventHandler(OnSimpleButton_MouseMove);
|
|
this.simpleButton.MouseLeave += new EventHandler(OnSimpleButton_MouseLeave);
|
|
}
|
|
|
|
private void OnSimpleButton_Load(object sender, EventArgs e)
|
|
{
|
|
this.emptyColor = this.BackColor;
|
|
}
|
|
|
|
private void OnSimpleButton_MouseLeave(object sender, EventArgs e)
|
|
{
|
|
this.BackColor = emptyColor;
|
|
}
|
|
|
|
private void OnSimpleButton_MouseMove(object sender, MouseEventArgs e)
|
|
{
|
|
this.BackColor = ColorTranslator.FromHtml("#1872cd");
|
|
}
|
|
}
|
|
}
|