diff options
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.cs | 8 |
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(); + } } } |
