Added: disable hotkeys in debug mode

This commit is contained in:
Ray committed 2021-07-24 21:20:50 +01:00
1 parent 6e13011147
commit 5af2eb7b54
1 file changed
+10 -4
+10 -4
View File
@@ -123,7 +123,9 @@ namespace FizzyLauncher
{
if (this.CurrentSession.HotKey.KeyCode != Keys.None)
{
#if !DEBUG
UnregisterHotKey((IntPtr)Handle, 1);
#endif
}
}
@@ -189,6 +191,7 @@ namespace FizzyLauncher
protected void invalidateHotKey()
{
#if !DEBUG
if (this.InvokeRequired)
{
this.Invoke(new MethodInvoker(() =>
@@ -200,11 +203,13 @@ namespace FizzyLauncher
{
UnregisterHotKey((IntPtr)Handle, 1);
}
#endif
if (this.CurrentSession.HotKey != null)
{
if (this.CurrentSession.HotKey.KeyCode != Keys.None)
{
#if !DEBUG
if (this.InvokeRequired)
{
this.Invoke(new MethodInvoker(() =>
@@ -216,6 +221,7 @@ namespace FizzyLauncher
{
RegisterHotKey((IntPtr)Handle, 1, this.CurrentSession.HotKey.ModifierCode, this.CurrentSession.HotKey.Key);
}
#endif
}
}
}
@@ -438,7 +444,7 @@ namespace FizzyLauncher
}
#region main menu
#region main menu
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
@@ -630,9 +636,9 @@ namespace FizzyLauncher
}
#endregion
#endregion
#region notification icon
#region notification icon
private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
@@ -650,7 +656,7 @@ namespace FizzyLauncher
}
#endregion
#endregion
}