mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-19 09:01:32 +01:00
Save the last update check date in registry.
This commit is contained in:
1 parent
32514af57c
commit
dac4f092ae
1 file changed
+10
-1
@@ -283,7 +283,14 @@ namespace FileConverter
|
||||
|
||||
if (this.Settings.CheckUpgradeAtStartup)
|
||||
{
|
||||
Task<UpgradeVersionDescription> task = Upgrade.Helpers.GetLatestVersionDescriptionAsync(this.OnGetLatestVersionDescription);
|
||||
long fileTime = Registry.GetValue<long>(Registry.Keys.LastUpdateCheckDate);
|
||||
DateTime lastUpdateDateTime = DateTime.FromFileTime(fileTime);
|
||||
|
||||
TimeSpan durationSinceLastUpdate = DateTime.Now.Subtract(lastUpdateDateTime);
|
||||
if (durationSinceLastUpdate > new TimeSpan(1, 0, 0, 0))
|
||||
{
|
||||
Task<UpgradeVersionDescription> task = Upgrade.Helpers.GetLatestVersionDescriptionAsync(this.OnGetLatestVersionDescription);
|
||||
}
|
||||
}
|
||||
|
||||
if (conversionPreset != null)
|
||||
@@ -423,6 +430,8 @@ namespace FileConverter
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Registry.SetValue(Registry.Keys.LastUpdateCheckDate, DateTime.Now.ToFileTime());
|
||||
|
||||
if (upgradeVersionDescription.LatestVersion <= ApplicationVersion)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user