IO-227 Succesful export of PPG information.

This commit is contained in:
Patrick Fic
2022-01-18 15:00:27 -08:00
parent d7cde2be37
commit 926f20ba0a
17 changed files with 214 additions and 38 deletions

View File

@@ -5,6 +5,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Squirrel;
using Microsoft.Win32.TaskScheduler;
namespace BodyshopPartner.Utils
{
public static class SquirrelAwareHelper
@@ -66,13 +69,30 @@ namespace BodyshopPartner.Utils
Utils.UpdateHandler.ToggleStartWithWindows(true);
mgr.CreateShortcutForThisExe();
},
onAppUpdate: v => {
onAppUpdate: v =>
{
mgr.CreateShortcutForThisExe();
Utils.UpdateHandler.RestoreSettings();
Utils.UpdateHandler.ToggleStartWithWindows(Properties.Settings.Default.StartWithWindows);
Utils.PaintScaleConfig.RegisterScheduledTask();
},
onAppUninstall: v => mgr.RemoveShortcutForThisExe(),
onAppUninstall: v =>
{
mgr.RemoveShortcutForThisExe();
try
{
Microsoft.Win32.TaskScheduler.Task existingTask = TaskService.Instance.FindTask("ImEX Online Partner - Paint Scale Connection");
if (existingTask != null)
{
TaskService.Instance.RootFolder.DeleteTask("ImEX Online Partner - Paint Scale Connection");
}
}
catch (Exception ex)
{
logger.Error(ex, "Error removing task while uninstalling.");
}
},
onFirstRun: () =>
{
logger.Info("We've run for the first time.");