Skip to content

Commit

Permalink
Merge pull request #12 from NBull92/dev
Browse files Browse the repository at this point in the history
Merging Dev into master
  • Loading branch information
NBull92 authored Apr 30, 2020
2 parents 1d4dfc8 + efa927f commit 02059f5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
48 changes: 28 additions & 20 deletions Src/ImprezGarage/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// This code is for portfolio use only.
//------------------------------------------------------------------------------

using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
Expand Down Expand Up @@ -38,31 +39,38 @@ protected override void InitializeShell()
#if !DEBUG
Task.Run(async () =>
{
// Keep in for testing locally.
//using (var mgr = new UpdateManager(@"D:\Documents\Nick\GitHub\ImprezGarage\Releases"))
//{
// var updateInfo = await mgr.CheckForUpdate();
// if (updateInfo.ReleasesToApply.Any())
// {
// await mgr.UpdateApp();
// UpdateManager.RestartApp();
// }
//}

using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/NBull92/ImprezGarage"))
try
{
var updateInfo = await mgr.Result.CheckForUpdate();
if (updateInfo.ReleasesToApply.Any())
// Keep in for testing locally.
//using (var mgr = new UpdateManager(@"D:\Documents\Nick\GitHub\ImprezGarage\Releases"))
//{
// var updateInfo = await mgr.CheckForUpdate();
// if (updateInfo.ReleasesToApply.Any())
// {
// await mgr.UpdateApp();
// UpdateManager.RestartApp();
// }
//}

using (var mgr = await UpdateManager.GitHubUpdateManager("https://github.com/NBull92/ImprezGarage"))
{
await mgr.Result.UpdateApp();
UpdateManager.RestartApp();
var updateInfo = await mgr.CheckForUpdate();
if (updateInfo.ReleasesToApply.Any())
{
await mgr.UpdateApp();
UpdateManager.RestartApp();
}
}
}

Application.Current.Dispatcher.Invoke(() =>
Application.Current.Dispatcher.Invoke(() =>
{
Application.Current.MainWindow?.Show();
});
}
catch (Exception e)
{
Application.Current.MainWindow?.Show();
});

}
});
#else
Application.Current.MainWindow?.Show();
Expand Down
4 changes: 2 additions & 2 deletions Src/ImprezGarage/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.26")]
[assembly: AssemblyFileVersion("1.0.26")]
[assembly: AssemblyVersion("1.0.27")]
[assembly: AssemblyFileVersion("1.0.27")]
1 change: 0 additions & 1 deletion Src/ImprezGarage/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
</baseClasses:DialogViewBase.Resources>

<Grid>
<!-- New UI -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="179"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Command="{Binding AddNewVehicleCommand}"
CommandParameter="{x:Type views:ManageVehicle}"/>

<ListBox Grid.Row="1" Margin="0,8,0,0"
<ListBox Grid.Row="1" Margin="0,8,5,0"
ItemsSource="{Binding Vehicles}" SelectedItem="{Binding SelectedVehicle}"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
Background="Transparent"
Expand Down

0 comments on commit 02059f5

Please sign in to comment.