aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-01-27 09:19:11 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-01-27 09:19:11 +0200
commitddda6089bff56e80703c8d2dce297919edc58bf1 (patch)
tree7702c5cf169124d522eacc7f1a9e0878373baedd /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
parent1d4d327571d4c0c9f4e17411551bd4dae1e2aed0 (diff)
parentbf2f3245339b9fd9148a2ad25b5ba3320e970cc1 (diff)
downloadTango-ddda6089bff56e80703c8d2dce297919edc58bf1.tar.gz
Tango-ddda6089bff56e80703c8d2dce297919edc58bf1.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
index 0235f8cca..2c3c9ccb9 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
@@ -49,6 +49,11 @@ namespace Tango.MachineStudio.UI.StudioApplication
public event EventHandler ApplicationReady;
/// <summary>
+ /// Occurs when the connected machine session has been lost and an automatic reconnection with the last machine is required.
+ /// </summary>
+ public event EventHandler ReconnectionRequired;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="DefaultStudioApplicationManager" /> class.
/// </summary>
/// <param name="navigationManager">The navigation manager.</param>
@@ -126,6 +131,8 @@ namespace Tango.MachineStudio.UI.StudioApplication
{
if (e == Transport.TransportComponentState.Disconnected || e == Transport.TransportComponentState.Failed)
{
+ bool reconnect = ConnectedMachine is IExternalBridgeSecureClient;
+
ConnectedMachine = null;
if (e == Transport.TransportComponentState.Failed)
@@ -134,12 +141,16 @@ namespace Tango.MachineStudio.UI.StudioApplication
ConnectionLostViewVM vm = new ConnectionLostViewVM()
{
- Exception = failed_reason
+ Exception = failed_reason,
+ AutoReconnect = reconnect,
};
InvokeUI(() =>
{
- _notification.ShowModalDialog<ConnectionLostViewVM, ConnectionLostView>(vm, (x) => { }, () => { });
+ _notification.ShowModalDialog<ConnectionLostViewVM, ConnectionLostView>(vm, (x) =>
+ {
+ ReconnectionRequired?.Invoke(this, new EventArgs());
+ }, () => { });
});
}
}