Files
Wino-Mail/Wino.Server.NET8/App.xaml.cs
2024-07-19 00:57:12 +02:00

36 lines
1001 B
C#

using H.NotifyIcon;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Input;
namespace Wino.Server.NET8
{
public partial class App : Application
{
public TaskbarIcon? TrayIcon { get; private set; }
public Window? Window { get; set; }
public bool HandleClosedEvents { get; set; } = true;
public App()
{
InitializeComponent();
}
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
}
private void InitializeTrayIcon()
{
var showHideWindowCommand = (XamlUICommand)Resources["ShowHideWindowCommand"];
// showHideWindowCommand.ExecuteRequested ;
var exitApplicationCommand = (XamlUICommand)Resources["ExitApplicationCommand"];
//exitApplicationCommand.ExecuteRequested += ExitApplicationCommand_ExecuteRequested;
TrayIcon = (TaskbarIcon)Resources["TrayIcon"];
TrayIcon.ForceCreate();
}
}
}