Split into service and UI

This commit is contained in:
2014-05-12 20:38:41 -04:00
parent 043daea51e
commit aa1d28d6a8
40 changed files with 1942 additions and 114 deletions

34
Window/App.xaml.cs Normal file
View File

@@ -0,0 +1,34 @@
using FloatingStatusWindowLibrary;
using System.Diagnostics;
using System.Windows;
using SystemTemperatureStatusWindow.Properties;
namespace SystemTemperatureStatusWindow
{
public partial class App
{
private WindowSource _windowSource;
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();
});
_windowSource = new WindowSource();
}
protected override void OnExit(ExitEventArgs e)
{
_windowSource.Dispose();
base.OnExit(e);
}
}
}