代码拉取完成,页面将自动刷新
同步操作将从 wxd_tony1984/DevelopAssistant 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DevelopAssistant.AddIn.Diffplex
{
[ToolboxItem(false)]
public class NImageButton : System.Windows.Forms.PictureBox
{
protected ToolTip toolTip = null;
protected bool mouserInside = false;
private string _tooltipText;
public string ToolTipText
{
get { return _tooltipText; }
set
{
_tooltipText = value;
toolTip.SetToolTip(this, _tooltipText);
}
}
private Image _iconImage;
public Image IconImage
{
get { return _iconImage; }
set { _iconImage = value; }
}
public NImageButton()
{
toolTip = new ToolTip();
}
protected override void OnPaint(PaintEventArgs paintEventArg)
{
base.OnPaint(paintEventArg);
DrawPaint(paintEventArg.Graphics);
}
private void DrawPaint(System.Drawing.Graphics g)
{
if (_iconImage != null)
{
Rectangle imageRect = new Rectangle(4, 4, 16, 16);
g.DrawImage(_iconImage, imageRect);
}
if (mouserInside)
{
Rectangle rect = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
g.FillRectangle(new System.Drawing.SolidBrush(Color.FromArgb(100, 142, 190, 139)), this.ClientRectangle);
g.DrawRectangle(new Pen(SystemColors.ControlDark), rect);
}
}
protected override void OnMouseEnter(EventArgs e)
{
base.OnMouseEnter(e);
this.mouserInside = true;
this.Invalidate();
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
this.mouserInside = false;
this.Invalidate();
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。