aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
index ed5ea2629..95c4ccdac 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
@@ -32,6 +32,7 @@ using Tango.PPC.UI.Dialogs;
using Tango.Core.Threading;
using Tango.PPC.Common.Messages;
using Tango.Core.ExtensionMethods;
+using Tango.PPC.Common.Navigation;
namespace Tango.PPC.UI.PPCApplication
{
@@ -130,6 +131,11 @@ namespace Tango.PPC.UI.PPCApplication
/// </summary>
public DateTime StartUpDate { get; private set; }
+ /// <summary>
+ /// Gets a value indicating whether an update has occurred before the application started.
+ /// </summary>
+ public bool IsAfterUpdate { get; private set; }
+
private bool _isScreenLocked;
/// <summary>
/// Gets or sets a value indicating whether the screen is currently locked.
@@ -220,6 +226,10 @@ namespace Tango.PPC.UI.PPCApplication
isAfterSetup = true;
LogManager.Log("System restart is required.");
}
+ else
+ {
+ IsAfterUpdate = true;
+ }
settings.ApplicationState = ApplicationStates.Ready;
settings.Save();
@@ -419,7 +429,7 @@ namespace Tango.PPC.UI.PPCApplication
/// <summary>
/// Restarts the application.
/// </summary>
- public void Restart()
+ public async void Restart()
{
if (IsShuttingDown) return;
@@ -427,8 +437,19 @@ namespace Tango.PPC.UI.PPCApplication
try
{
+ _dispatcher.Invoke(() =>
+ {
+ var nav = TangoIOC.Default.GetInstance<INavigationManager>();
+ if (nav != null)
+ {
+ nav.NavigateTo(NavigationView.RestartingView);
+ }
+ });
+
LogManager.Log("Restarting the application...");
+ await Task.Delay(8000);
+
_watchdogServer.Dispose();
foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<PPCViewModel>())