Start working towards Squirrel install/update

This commit is contained in:
2018-05-24 20:39:19 -04:00
parent 299d85140d
commit 54da717e56
19 changed files with 671 additions and 110 deletions

View File

@@ -1,4 +1,6 @@
using FloatingStatusWindowLibrary;
using Squirrel;
using System;
using System.Diagnostics;
using System.Windows;
using SystemTemperatureStatusWindow.Properties;
@@ -8,6 +10,18 @@ namespace SystemTemperatureStatusWindow
public partial class App
{
private WindowSource _windowSource;
public static string UpdateUrl = "https://github.com/ckaczor/SystemTemperatureStatusWindow";
[STAThread]
public static void Main(string[] args)
{
SquirrelAwareApp.HandleEvents(onAppUpdate: version => Common.Settings.Extensions.RestoreSettings());
var application = new App();
application.InitializeComponent();
application.Run();
}
protected override void OnStartup(StartupEventArgs e)
{
@@ -15,11 +29,11 @@ namespace SystemTemperatureStatusWindow
StartManager.ManageAutoStart = true;
StartManager.AutoStartEnabled = !Debugger.IsAttached && Settings.Default.AutoStart;
StartManager.AutoStartChanged += (value =>
StartManager.AutoStartChanged += value =>
{
Settings.Default.AutoStart = value;
Settings.Default.Save();
});
};
_windowSource = new WindowSource();
}