From 98831ede323db7eaa25bdb30df58a79b5fc74710 Mon Sep 17 00:00:00 2001 From: Gwen Demulder <31825690+scara1701@users.noreply.github.com> Date: Wed, 7 Dec 2022 08:45:12 +0100 Subject: [PATCH] changed button labels in list --- CtxNotTopmost/ViewModels/MainViewModel.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CtxNotTopmost/ViewModels/MainViewModel.cs b/CtxNotTopmost/ViewModels/MainViewModel.cs index 4a1b111..a33ca90 100644 --- a/CtxNotTopmost/ViewModels/MainViewModel.cs +++ b/CtxNotTopmost/ViewModels/MainViewModel.cs @@ -69,6 +69,15 @@ private async Task DetectingOpenWindows(CancellationToken token) { activeWindows.Remove(item); } + else + { + ActiveWindow a = activeWindows.Where(a => a.wHnd == item.wHnd).FirstOrDefault(); + if (a != null) + { + ActiveWindow g = getActiveWindows.Where(a => a.wHnd == item.wHnd).First(); + a.Title = $"{g.ProcessName}: {g.Title}"; + } + } } //}); ActiveWindows = ActiveWindows.OrderBy(w => w.Title).ToList();