Files
Taskbar-Launcher/App.xaml.cs
2026-06-02 20:59:34 -04:00

37 lines
944 B
C#

using TaskbarLauncher.Services;
namespace TaskbarLauncher;
public partial class App : System.Windows.Application
{
private LauncherController? controller;
protected override void OnStartup(System.Windows.StartupEventArgs e)
{
base.OnStartup(e);
ThemeService.Apply();
controller = new LauncherController();
controller.Start();
if (e.Args.Contains("--show-settings", StringComparer.OrdinalIgnoreCase))
{
controller.ShowSettings();
}
else if (e.Args.Contains("--show-about", StringComparer.OrdinalIgnoreCase))
{
controller.ShowAbout();
}
else if (e.Args.Contains("--show-launcher", StringComparer.OrdinalIgnoreCase))
{
controller.TogglePopup();
}
}
protected override void OnExit(System.Windows.ExitEventArgs e)
{
controller?.Dispose();
base.OnExit(e);
}
}