aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-17 15:07:53 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-17 15:07:53 +0200
commit50cb0b54f51275ee650d4f2c838b1c670da1c8dd (patch)
treed423351789ae48dbd4466b4c937abf8b2a2cd505 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
parent3ba4bb906d68acb627e8814a97023c68a8ce91cd (diff)
parenta1be0b0db7f8284cac6a9b5c3aecd1c9968c82ce (diff)
downloadTango-50cb0b54f51275ee650d4f2c838b1c670da1c8dd.tar.gz
Tango-50cb0b54f51275ee650d4f2c838b1c670da1c8dd.zip
merge tpf
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs8
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)