Base squirrel config.

This commit is contained in:
Patrick Fic
2020-01-30 22:02:12 -08:00
parent 06b516a5b8
commit 8cdb41f59b
6 changed files with 171 additions and 0 deletions

View File

@@ -65,6 +65,11 @@ namespace BodyshopUploader.ViewModels
_callingThread.ReportProgress(30);
_updateCheckTimer.Elapsed += _updateTimer_Elapsed;
_updateCheckTimer.AutoReset = true;
_updateCheckTimer.Start();
_callingThread.ReportProgress(50);
//Cannot use await.
LoadBodyshopData().Wait(); ;
@@ -74,6 +79,13 @@ namespace BodyshopUploader.ViewModels
_callingThread.ReportProgress(100);
}
private async void _updateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if(await Utils.UpdateHandler.AreUpdatesAvailable())
{
await Utils.UpdateHandler.ApplyUpdates(Progress, Progress);
}
}
private void MonitoringPathsChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{