From 35cef16ffc96b06f68f122361ea84030169bb730 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 10 Feb 2020 13:33:02 +0200 Subject: Some fixes on transport layer. Fix on machine operator upgrade firmware.. Fix on SessionFileLogger. Fix on PPC jobs view. Fix on Tech Catalog View. --- .../DefaultStudioApplicationManager.cs | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') 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 2c3c9ccb9..ed5f8b394 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -42,6 +42,7 @@ namespace Tango.MachineStudio.UI.StudioApplication private INotificationProvider _notification; private List _openedWindows; private List _notified_view_models; + private bool _isDialogShown; /// /// Occurs when the application is ready. @@ -139,19 +140,28 @@ namespace Tango.MachineStudio.UI.StudioApplication { String failed_reason = (sender as IMachineOperator).FailedStateException.Message; - ConnectionLostViewVM vm = new ConnectionLostViewVM() + if (!_isDialogShown) { - Exception = failed_reason, - AutoReconnect = reconnect, - }; + _isDialogShown = true; - InvokeUI(() => - { - _notification.ShowModalDialog(vm, (x) => + ConnectionLostViewVM vm = new ConnectionLostViewVM() + { + Exception = failed_reason, + AutoReconnect = reconnect, + }; + + InvokeUI(() => { - ReconnectionRequired?.Invoke(this, new EventArgs()); - }, () => { }); - }); + _notification.ShowModalDialog(vm, (x) => + { + _isDialogShown = false; + ReconnectionRequired?.Invoke(this, new EventArgs()); + }, () => + { + _isDialogShown = false; + }); + }); + } } } } -- cgit v1.3.1