Skip to content

Commit

Permalink
Added an option to allow customizing the interval for automatic check…
Browse files Browse the repository at this point in the history
…ing for updates.
  • Loading branch information
xvitaly committed Sep 20, 2024
1 parent 8763ed0 commit 57a8af1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mhed/FrmMhed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private bool CheckScreenBounds()
/// </summary>
private bool IsAutoUpdateCheckNeeded()
{
return Properties.Settings.Default.AutoUpdateCheck && (DateTime.Now - Properties.Settings.Default.LastUpdateTime).Days >= 7;
return Properties.Settings.Default.AutoUpdateCheck && (DateTime.Now - Properties.Settings.Default.LastUpdateTime).Days >= Properties.Settings.Default.UpdateCheckInterval;
}

/// <summary>
Expand Down
14 changes: 13 additions & 1 deletion src/mhed/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/mhed/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@
<Setting Name="MultiByteEncoding" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="UpdateCheckInterval" Type="System.Int32" Scope="User">
<Value Profile="(Default)">7</Value>
</Setting>
</Settings>
</SettingsFile>
3 changes: 3 additions & 0 deletions src/mhed/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
<setting name="MultiByteEncoding" serializeAs="String">
<value>False</value>
</setting>
<setting name="UpdateCheckInterval" serializeAs="String">
<value>7</value>
</setting>
</mhed.gui.Properties.Settings>
</userSettings>
<applicationSettings>
Expand Down

0 comments on commit 57a8af1

Please sign in to comment.