Add project files.

This commit is contained in:
Blade / SCOPEDD
2026-02-22 11:31:35 -05:00
parent 3612bf40db
commit c1a425a7ad
84 changed files with 2323 additions and 0 deletions

46
ClipForge/App.xaml.cs Normal file
View File

@@ -0,0 +1,46 @@
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using WinRT.Interop;
namespace ClipForge
{
public partial class App : Application
{
public MainWindow? MainWindow { get; private set; }
public static DispatcherQueue? MainQueue { get; private set; }
public TrayIconService? TrayIcon { get; private set; }
public App()
{
this.InitializeComponent();
}
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
MainQueue = DispatcherQueue.GetForCurrentThread();
MainWindow = new MainWindow();
MainWindow.Activate();
var hwnd = WindowNative.GetWindowHandle(MainWindow);
TrayIcon = new TrayIconService();
TrayIcon.Initialize(
hwnd,
showWindow: () =>
{
MainQueue?.TryEnqueue(() =>
{
MainWindow?.AppWindow.Show();
MainWindow?.Activate();
});
},
exitApp: () =>
{
MainQueue?.TryEnqueue(() =>
{
TrayIcon?.Dispose();
Microsoft.UI.Xaml.Application.Current.Exit();
});
});
}
}
}