UCHotKeyItem.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Windows.Forms;
using KeyGo.Properties;
namespace KeyGo
{
public partial class UCHotKeyItem : UserControl
{
public UCHotKeyItem()
{
InitializeComponent();
}
private HotKeyItem _HotKeyItem;
public HotKeyItem HotKeyItem
{
get => _HotKeyItem;
set => ShowHotKeyItem(_HotKeyItem = value);
}
public KeyGo KeyGo { get; set; }
/// <summary>
/// 值改变时触发
/// </summary>
public event EventHandler ValueChangedEvent;
private void OnValueChanged() => ValueChangedEvent?.Invoke(this, EventArgs.Empty);
/// <summary>
/// 显示信息
/// </summary>
/// <param name="item">The item.</param>
private void ShowHotKeyItem(HotKeyItem item)
{
LblTitle.Text = item.ProcessName;
LblHotKey.Text = item.HotKey;
HotKeyBtnEnable = item.Enabled;
if (item.Enabled && item.HotKeyID == 0)
LblHotKey.ForeColor = Color.Red;
else
LblHotKey.ForeColor = Color.Black;
}
/// <summary>
/// 热键使能按钮状态
/// </summary>
private bool HotKeyBtnEnable
{
set
{
if (value)
BtnEnable.BackgroundImage = Resources.ImgEnable;
else
BtnEnable.BackgroundImage = Resources.ImgDisable;
}
}
后面还有 78 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
