mirror of
https://github.com/jie65535/KeyGo.git
synced 2025-06-09 17:49:46 +08:00
1. 增加 删除热键前询问
This commit is contained in:
parent
2314afa9f3
commit
2ea8cbf725
@ -120,15 +120,18 @@ namespace KeyGo
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void BtnDel_Click(object sender, EventArgs e)
|
private void BtnDel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
if (MessageBox.Show("是否确定删除该热键?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
KeyGo.DelHotKey(HotKeyItem);
|
try
|
||||||
Parent?.Controls.Remove(this);
|
{
|
||||||
OnValueChanged();
|
KeyGo.DelHotKey(HotKeyItem);
|
||||||
}
|
Parent?.Controls.Remove(this);
|
||||||
catch (Exception ex)
|
OnValueChanged();
|
||||||
{
|
}
|
||||||
MessageBox.Show("在注销热键时异常:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("在注销热键时异常:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user