aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-05 20:38:47 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-05 20:38:47 +0300
commit822707058d3fe957e03887a3969d553a65537031 (patch)
treea40546d5cd0c32a83cf548e2ce0bd54c46d932bc /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
parent5571ab086f6288b27117e3eaae443415a162403c (diff)
downloadTango-822707058d3fe957e03887a3969d553a65537031.tar.gz
Tango-822707058d3fe957e03887a3969d553a65537031.zip
Improved safety operations handling from ExternalBridgeReceiver.
Suppress firmware upgrade on remote upgrade feature.
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.cs9
1 files changed, 2 insertions, 7 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 538b1f272..f10e84d05 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
@@ -25,9 +25,7 @@ namespace Tango.PPC.UI.ViewModels
{
private bool _disconnecting;
- //Full Name, Authentication time
- private Dictionary<String, DateTime> _authenticatedSafetyUsers;
- private const int KEEP_SAFETY_AUTHENTICATION_MINUTES = 1;
+ private const int KEEP_SAFETY_AUTHENTICATION_MINUTES = 5;
#region Properties
@@ -69,7 +67,6 @@ namespace Tango.PPC.UI.ViewModels
/// </summary>
public ExternalBridgeViewVM()
{
- _authenticatedSafetyUsers = new Dictionary<string, DateTime>();
CloseSessionCommand = new RelayCommand(CloseSession, () => !_disconnecting);
}
@@ -162,13 +159,12 @@ namespace Tango.PPC.UI.ViewModels
DateTime lastAuthenticationTime;
bool bypassSafetyConfirmation = false;
- if (_authenticatedSafetyUsers.TryGetValue(e.Request.UserName, out lastAuthenticationTime))
+ if (ExternalBridgeReceiver.LastSafetyLevelContactsTimes.TryGetValue(e.Request.UserName, out lastAuthenticationTime))
{
if (DateTime.Now < lastAuthenticationTime.AddMinutes(KEEP_SAFETY_AUTHENTICATION_MINUTES))
{
bypassSafetyConfirmation = true;
e.Confirm();
- _authenticatedSafetyUsers[e.Request.UserName] = DateTime.Now;
}
}
@@ -180,7 +176,6 @@ namespace Tango.PPC.UI.ViewModels
if (vm.DialogResult)
{
e.Confirm();
- _authenticatedSafetyUsers[e.Request.UserName] = DateTime.Now;
}
else
{