Added: disable hotkeys in debug mode
This commit is contained in:
parent
6e13011147
commit
5af2eb7b54
@ -123,7 +123,9 @@ namespace FizzyLauncher
|
|||||||
{
|
{
|
||||||
if (this.CurrentSession.HotKey.KeyCode != Keys.None)
|
if (this.CurrentSession.HotKey.KeyCode != Keys.None)
|
||||||
{
|
{
|
||||||
|
#if !DEBUG
|
||||||
UnregisterHotKey((IntPtr)Handle, 1);
|
UnregisterHotKey((IntPtr)Handle, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,6 +191,7 @@ namespace FizzyLauncher
|
|||||||
|
|
||||||
protected void invalidateHotKey()
|
protected void invalidateHotKey()
|
||||||
{
|
{
|
||||||
|
#if !DEBUG
|
||||||
if (this.InvokeRequired)
|
if (this.InvokeRequired)
|
||||||
{
|
{
|
||||||
this.Invoke(new MethodInvoker(() =>
|
this.Invoke(new MethodInvoker(() =>
|
||||||
@ -200,11 +203,13 @@ namespace FizzyLauncher
|
|||||||
{
|
{
|
||||||
UnregisterHotKey((IntPtr)Handle, 1);
|
UnregisterHotKey((IntPtr)Handle, 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (this.CurrentSession.HotKey != null)
|
if (this.CurrentSession.HotKey != null)
|
||||||
{
|
{
|
||||||
if (this.CurrentSession.HotKey.KeyCode != Keys.None)
|
if (this.CurrentSession.HotKey.KeyCode != Keys.None)
|
||||||
{
|
{
|
||||||
|
#if !DEBUG
|
||||||
if (this.InvokeRequired)
|
if (this.InvokeRequired)
|
||||||
{
|
{
|
||||||
this.Invoke(new MethodInvoker(() =>
|
this.Invoke(new MethodInvoker(() =>
|
||||||
@ -216,6 +221,7 @@ namespace FizzyLauncher
|
|||||||
{
|
{
|
||||||
RegisterHotKey((IntPtr)Handle, 1, this.CurrentSession.HotKey.ModifierCode, this.CurrentSession.HotKey.Key);
|
RegisterHotKey((IntPtr)Handle, 1, this.CurrentSession.HotKey.ModifierCode, this.CurrentSession.HotKey.Key);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user