Add template project

This commit is contained in:
2026-02-27 12:17:48 -05:00
parent e2236ddc16
commit de3f6c2e98
29 changed files with 2110 additions and 2 deletions

38
Template/App.xaml.cs Normal file
View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using ChrisKaczor.Wpf.Windows.FloatingStatusWindow;
using Template.Properties;
namespace Template;
public partial class App
{
private List<IDisposable> _windowSourceList;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
StartManager.ManageAutoStart = true;
StartManager.AutoStartEnabled = !Debugger.IsAttached && Settings.Default.AutoStart;
StartManager.AutoStartChanged += (value =>
{
Settings.Default.AutoStart = value;
Settings.Default.Save();
});
_windowSourceList =
[
new WindowSource()
];
}
protected override void OnExit(ExitEventArgs e)
{
_windowSourceList.ForEach(ws => ws.Dispose());
base.OnExit(e);
}
}