From 0092c51fa1ab49213515e536c98f47a7b4ff5b32 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Sun, 8 Mar 2026 17:01:20 -0500 Subject: [PATCH] Show the exe name in the context menu and tray icon Added a disabled first item to the shared main context menu showing the current exe name without path or extension, followed by a separator. The label comes from App.MainFileInfo via a new static property in App.xaml.cs and the menu insertion is in MainWindow.xaml. The tray icon hover tooltip now uses the same executable display name string via App.MainFileDisplayName in MainWindow.xaml. Closes #95 --- DesktopClock/App.xaml.cs | 1 + DesktopClock/MainWindow.xaml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/DesktopClock/App.xaml.cs b/DesktopClock/App.xaml.cs index 9329f12..e622055 100644 --- a/DesktopClock/App.xaml.cs +++ b/DesktopClock/App.xaml.cs @@ -13,6 +13,7 @@ namespace DesktopClock; public partial class App : Application { public static FileInfo MainFileInfo = new(Process.GetCurrentProcess().MainModule.FileName); + public static string MainFileDisplayName => Path.GetFileNameWithoutExtension(MainFileInfo.Name); /// /// Sets or deletes a value in the registry which enables the current executable to run on system startup. diff --git a/DesktopClock/MainWindow.xaml b/DesktopClock/MainWindow.xaml index 4a8e08c..244c1a3 100644 --- a/DesktopClock/MainWindow.xaml +++ b/DesktopClock/MainWindow.xaml @@ -30,14 +30,17 @@ + + + + - - @@ -67,7 +70,7 @@