aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-28 10:55:56 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-28 10:55:56 +0200
commit36f19301ac0cc27d74b73eb4b31fdecfd86f5060 (patch)
treee4f4a636f4a2dc03376e6eff2077ced4079429ed /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
parent1ea2a13900697e203658ff8c9489b70866792a49 (diff)
parentb62c4b8b67b3103c691564df80f65423a9c315a0 (diff)
downloadTango-36f19301ac0cc27d74b73eb4b31fdecfd86f5060.tar.gz
Tango-36f19301ac0cc27d74b73eb4b31fdecfd86f5060.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs27
1 files changed, 17 insertions, 10 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 a8faeea7b..80a95d1bf 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
@@ -7,6 +7,7 @@ using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.Core.DI;
using Tango.Integration.ExternalBridge;
+using Tango.PMR.Integration;
using Tango.PPC.Common;
using Tango.PPC.Common.ExternalBridge;
using Tango.PPC.Common.Navigation;
@@ -115,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>
@@ -132,7 +136,7 @@ namespace Tango.PPC.UI.ViewModels
{
LogManager.Log($"External bridge connection request received.\n{e.ToJsonString()}");
- if (e.Request.Password == Settings.ExternalBridgePassword)
+ if (!e.Request.Intent.RequiresPassword() || e.Request.Password == Settings.ExternalBridgePassword)
{
e.Confirmed = true;
@@ -145,11 +149,14 @@ namespace Tango.PPC.UI.ViewModels
LogManager.Log($"External bridge connection user has been identified as {User.Contact.FullName}");
}
- LogManager.Log("Navigating to external bridge view...");
- InvokeUI(() =>
+ if (e.Request.Intent == ExternalBridgeLoginIntent.FullControl)
{
- NavigationManager.NavigateTo(NavigationView.ExternalBridgeView, false);
- });
+ LogManager.Log("Navigating to external bridge view...");
+ InvokeUI(() =>
+ {
+ NavigationManager.NavigateTo(NavigationView.ExternalBridgeView, false);
+ });
+ }
}
else
{