Source/Editors/VisualToggleButton.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if FRAMEWORK20
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Drawing;
namespace DevComponents.Editors
{
public class VisualToggleButton : VisualItem
{
#region Private Variables
#endregion
#region Events
/// <summary>
/// Occurs when Checked property has changed.
/// </summary>
public event EventHandler CheckedChanged;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the VisualToggleButton class.
/// </summary>
public VisualToggleButton()
{
this.Focusable = true;
}
#endregion
#region Internal Implementation
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left && GetIsEnabled())
{
ToggleChecked();
IsMouseDown = true;
}
base.OnMouseDown(e);
}
protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
IsMouseDown = false;
base.OnMouseUp(e);
}
protected override void OnMouseEnter()
{
this.IsMouseOver = true;
base.OnMouseEnter();
}
protected override void OnMouseLeave()
{
this.IsMouseOver = false;
后面还有 87 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。