aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication')
-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());
+ }, () => { });
});
}
}