diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-02-10 13:33:02 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-02-10 13:33:02 +0200 |
| commit | 35cef16ffc96b06f68f122361ea84030169bb730 (patch) | |
| tree | 1cd239e14c8ab6733ac7225e4b39bdd282c83a9f /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication | |
| parent | 1ae720e9052b2419200c113ad1fa42550382e6c7 (diff) | |
| download | Tango-35cef16ffc96b06f68f122361ea84030169bb730.tar.gz Tango-35cef16ffc96b06f68f122361ea84030169bb730.zip | |
Some fixes on transport layer.
Fix on machine operator upgrade firmware..
Fix on SessionFileLogger.
Fix on PPC jobs view.
Fix on Tech Catalog View.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs | 30 |
1 files changed, 20 insertions, 10 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 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<Window> _openedWindows; private List<IStudioViewModel> _notified_view_models; + private bool _isDialogShown; /// <summary> /// 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<ConnectionLostViewVM, ConnectionLostView>(vm, (x) => + ConnectionLostViewVM vm = new ConnectionLostViewVM() + { + Exception = failed_reason, + AutoReconnect = reconnect, + }; + + InvokeUI(() => { - ReconnectionRequired?.Invoke(this, new EventArgs()); - }, () => { }); - }); + _notification.ShowModalDialog<ConnectionLostViewVM, ConnectionLostView>(vm, (x) => + { + _isDialogShown = false; + ReconnectionRequired?.Invoke(this, new EventArgs()); + }, () => + { + _isDialogShown = false; + }); + }); + } } } } |
