From 3f0c0bf7b8f678dfc145e62d8ea9d68a1109a7bd Mon Sep 17 00:00:00 2001 From: glax Date: Tue, 16 Apr 2024 04:56:16 +0200 Subject: [PATCH] Formatting --- OBSBlur/OBS/Blur.cs | 7 ++++--- OBSBlur/Window/WindowInfo.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OBSBlur/OBS/Blur.cs b/OBSBlur/OBS/Blur.cs index 29d603e..d90ee81 100644 --- a/OBSBlur/OBS/Blur.cs +++ b/OBSBlur/OBS/Blur.cs @@ -178,11 +178,12 @@ public class Blur WindowInfo windowInfo = windowManager.WindowInfos.FirstOrDefault(w => w.WindowHandle == windowHandle); if (windowInfo.WindowHandle is 0x0) continue; - prnt += $"{++i,3} {windowInfo}\n"; + prnt += $"{++i,3} | {windowInfo}\n"; } - Console.WriteLine(prnt); Console.WriteLine($"Z-order changed {DateTime.UtcNow:O}"); + Console.WriteLine($"{"Z",3} | {"hWnd",8} | {"PID",8} | {"Name",17} | {"Window Title",-17} | {"Vis",-8} | {"State",-13} | Rectangle"); + Console.WriteLine(prnt); UpdateBlurs(zOrder: neworder); } @@ -191,8 +192,8 @@ public class Blur string prnt = ""; foreach (WindowInfo windowInfo in after) prnt += $"{windowInfo}\n"; - Console.WriteLine(prnt); Console.WriteLine($"Windows changed {DateTime.UtcNow:O}"); + Console.WriteLine(prnt); UpdateBlurs(windowInfos: after); } diff --git a/OBSBlur/Window/WindowInfo.cs b/OBSBlur/Window/WindowInfo.cs index 9b674fc..4ff27c9 100644 --- a/OBSBlur/Window/WindowInfo.cs +++ b/OBSBlur/Window/WindowInfo.cs @@ -47,6 +47,6 @@ public struct WindowInfo const int cutoffStr = 17; string processNameStr = ProcessInfo.ProcessName.Substring(0, Math.Min(cutoffStr, ProcessInfo.ProcessName.Length)); string windowTitleStr = WindowTitle.Substring(0, Math.Min(cutoffStr, WindowTitle.Length)); - return $"{WindowHandle,8} {ProcessInfo.Id,8} {processNameStr,cutoffStr} {windowTitleStr,-cutoffStr} {(IsVisible ? "visible" : "hidden"),-8} {WindowCommands,-13} {WindowRectangle}"; + return $"{WindowHandle,8} | {ProcessInfo.Id,8} | {processNameStr,cutoffStr} | {windowTitleStr,-cutoffStr} | {(IsVisible ? "visible" : "hidden"),-8} | {WindowCommands,-13} | {WindowRectangle}"; } } \ No newline at end of file