Add About dialog and app metadata

This commit is contained in:
Ray Berezowski
2026-06-02 18:57:04 -04:00
parent d328c38f31
commit 27a67d2136
7 changed files with 197 additions and 9 deletions

View File

@@ -13,6 +13,7 @@ public sealed class LauncherController : IDisposable
private NotifyIcon? notifyIcon;
private LauncherPopup? popup;
private MainWindow? settingsWindow;
private AboutWindow? aboutWindow;
public LauncherConfig Config { get; private set; } = new();
@@ -38,6 +39,20 @@ public sealed class LauncherController : IDisposable
settingsWindow.Activate();
}
public void ShowAbout()
{
if (aboutWindow?.IsVisible == true)
{
aboutWindow.Activate();
return;
}
aboutWindow = new AboutWindow();
aboutWindow.Closed += (_, _) => aboutWindow = null;
aboutWindow.Show();
aboutWindow.Activate();
}
public void TogglePopup()
{
if (popup?.IsVisible == true)
@@ -83,6 +98,7 @@ public sealed class LauncherController : IDisposable
notifyIcon.DoubleClick += (_, _) => TogglePopup();
notifyIcon.ContextMenuStrip.Items.Add("Open Launcher", null, (_, _) => TogglePopup());
notifyIcon.ContextMenuStrip.Items.Add("Settings", null, (_, _) => ShowSettings());
notifyIcon.ContextMenuStrip.Items.Add("About", null, (_, _) => ShowAbout());
notifyIcon.ContextMenuStrip.Items.Add("Reload Config", null, (_, _) => ReloadConfig());
notifyIcon.ContextMenuStrip.Items.Add("Open Config Folder", null, (_, _) => ConfigService.OpenConfigFolder());
notifyIcon.ContextMenuStrip.Items.Add("Exit", null, (_, _) => System.Windows.Application.Current.Shutdown());