mirror of
https://github.com/ckaczor/SystemTemperatureStatusWindow.git
synced 2026-01-23 01:25:43 -05:00
Start working towards Squirrel install/update
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user