mirror of
https://github.com/ckaczor/SystemTemperatureStatusWindow.git
synced 2026-01-19 01:25:40 -05:00
Auto start support
This commit is contained in:
13
App.xaml.cs
13
App.xaml.cs
@@ -1,4 +1,7 @@
|
||||
using System.Windows;
|
||||
using FloatingStatusWindowLibrary;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using SystemTemperatureStatusWindow.Properties;
|
||||
|
||||
namespace SystemTemperatureStatusWindow
|
||||
{
|
||||
@@ -10,6 +13,14 @@ namespace SystemTemperatureStatusWindow
|
||||
{
|
||||
base.OnStartup(e);
|
||||
|
||||
StartManager.ManageAutoStart = true;
|
||||
StartManager.AutoStartEnabled = !Debugger.IsAttached && Settings.Default.AutoStart;
|
||||
StartManager.AutoStartChanged += (value =>
|
||||
{
|
||||
Settings.Default.AutoStart = value;
|
||||
Settings.Default.Save();
|
||||
});
|
||||
|
||||
_windowSource = new WindowSource();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user