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)
{

View File

@@ -12,6 +12,7 @@ namespace BodyshopUploader.ViewModels
public partial class MainViewModel : BaseViewModel
{
public GrowlNotification Growler;
private System.Timers.Timer _updateCheckTimer = new System.Timers.Timer(60 * 1000);
private ObservableCollection<Monitor> _monitoringPaths = new ObservableCollection<Monitor>();
public ObservableCollection<Monitor> MonitoringPaths