diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-17 14:24:25 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-17 14:24:25 +0200 |
| commit | 38feb2cdb472f67d86a217074d9f7568c708dbb4 (patch) | |
| tree | 2f0d11043978a9dafea40232cab138ee6474d60f /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | aa9853ff33557531d89d8ce4f2eb196f45b0a591 (diff) | |
| parent | c8629b193fd4fa38f72905f1c33abe737f81a340 (diff) | |
| download | Tango-38feb2cdb472f67d86a217074d9f7568c708dbb4.tar.gz Tango-38feb2cdb472f67d86a217074d9f7568c708dbb4.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs | 13 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs | 8 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs index 83f629159..80a95d1bf 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs @@ -116,12 +116,15 @@ namespace Tango.PPC.UI.ViewModels /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void ExternalBridgeService_ClientDisconnected(object sender, EventArgs e) { - LogManager.Log("External bridge client disconnected. Navigating to home module..."); - - InvokeUI(() => + if (IsVisible) { - NavigationManager.NavigateTo(NavigationView.HomeModule); - }); + LogManager.Log("External bridge client disconnected. Navigating to home module..."); + + InvokeUI(() => + { + NavigationManager.NavigateTo(NavigationView.HomeModule); + }); + } } /// <summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs index 07da99818..f265c5dbf 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -140,6 +140,14 @@ namespace Tango.PPC.UI.ViewModels _isChecking = true; IsDbUpdate = false; + await Task.Delay(2000); + if (!await ConnectivityProvider.CheckInternetConnection()) + { + _isChecking = false; + await NavigateTo(MachineUpdateView.UpdateCheckErrorView); + return; + } + var response = await MachineUpdateManager.CheckForUpdate(MachineProvider.Machine.SerialNumber); if (response.IsUpdateAvailable) |
