Skip to content

Commit 05623ae

Browse files
committed
tweak the Squirrel
1 parent 488e18c commit 05623ae

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

F1InXAML/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:local="clr-namespace:F1InXAML"
55
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
6-
Startup="App_OnStartup">
6+
Startup="App_OnStartup" Exit="App_OnExit">
77
<Application.Resources>
88
<ResourceDictionary>
99
<ResourceDictionary.MergedDictionaries>

F1InXAML/App.xaml.cs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ namespace F1InXAML
1515
/// Interaction logic for App.xaml
1616
/// </summary>
1717
public partial class App : Application
18-
{
18+
{
19+
private static Task<UpdateManager> _updateManager = null;
20+
21+
1922
private void App_OnStartup(object sender, StartupEventArgs e)
2023
{
2124
//Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),
@@ -29,25 +32,20 @@ private void App_OnStartup(object sender, StartupEventArgs e)
2932
var mainWindow = new MainWindow {DataContext = new MainViewModel()};
3033
mainWindow.Show();
3134

32-
#if RELEASE
3335
Task.Factory.StartNew(CheckForUpdates);
34-
#endif
3536
}
3637

3738
private static async void CheckForUpdates()
39+
{
40+
_updateManager = UpdateManager.GitHubUpdateManager("https://github.com/MaterialDesignInXAML/F1InXAML", "F1ix");
41+
42+
if (_updateManager.Result.IsInstalledApp)
43+
await _updateManager.Result.UpdateApp();
44+
}
45+
46+
private void App_OnExit(object sender, ExitEventArgs e)
3847
{
39-
using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/MaterialDesignInXAML/F1InXAML"))
40-
{
41-
try
42-
{
43-
mgr.Result.UpdateApp();
44-
}
45-
catch (Exception)
46-
{
47-
48-
}
49-
50-
}
48+
_updateManager?.Dispose();
5149
}
5250
}
5351
}

F1InXAML/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.2")]
55-
[assembly: AssemblyFileVersion("1.0.2")]
54+
[assembly: AssemblyVersion("1.0.3")]
55+
[assembly: AssemblyFileVersion("1.0.3")]
Binary file not shown.

Releases/RELEASES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
6E28337E544E7ED7B0CEACE28C637E4747563455 F1ix-1.0.2-full.nupkg 3206929
1+
6E28337E544E7ED7B0CEACE28C637E4747563455 F1ix-1.0.2-full.nupkg 3206929
2+
9D70F6DD33F856994BD4C7DBC1E28CABF649B7BE F1ix-1.0.3-delta.nupkg 11952
3+
2D2F003962C8C0FA5F18FC10FED349013D9ABC35 F1ix-1.0.3-full.nupkg 3207107

Releases/Setup.exe

0 Bytes
Binary file not shown.

Releases/Setup.msi

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)