aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-29 14:43:11 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-29 14:43:11 +0200
commit5a1fafe5ba74f32fcabaf25466c046527ff2384e (patch)
tree07f313e2f25d2e58f3abd48794e176611bf20d6e /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
parent1fabacea3865a285f34a706a4a83006a7e59fb50 (diff)
parentbb541d734bae59614659fe1c4bc4bbe2f85d16d0 (diff)
downloadTango-5a1fafe5ba74f32fcabaf25466c046527ff2384e.tar.gz
Tango-5a1fafe5ba74f32fcabaf25466c046527ff2384e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
index ef1126261..20cfd6bf4 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
@@ -250,6 +250,8 @@ namespace Tango.PPC.MachineSettings.ViewModels
await MachineProvider.SaveMachine();
+ bool isRestarting = false;
+
if (_previousTimeZone.ToStringSafe() != SelectedTimeZone.ToStringSafe())
{
if (await NotificationProvider.ShowQuestion("Changing the time zone requires the application to restart. Do you wish to restart the application?"))
@@ -260,6 +262,7 @@ namespace Tango.PPC.MachineSettings.ViewModels
NotificationProvider.SetGlobalBusyMessage("Setting new time zone...");
await OperationSystemManager.ChangeTimeZone(SelectedTimeZone);
NotificationProvider.ReleaseGlobalBusyMessage();
+ isRestarting = true;
ApplicationManager.Restart();
}
catch (Exception ex)
@@ -298,7 +301,10 @@ namespace Tango.PPC.MachineSettings.ViewModels
}
}
- await NavigationManager.NavigateBack();
+ if (!isRestarting)
+ {
+ await NavigationManager.NavigateBack();
+ }
}
}