diff options
| author | Mirta <mirta@twine-s.com> | 2020-12-30 16:39:52 +0200 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2020-12-30 16:39:52 +0200 |
| commit | 00a491d93733d4625ad329b2ba8237f445364b3f (patch) | |
| tree | 4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs | |
| parent | 124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff) | |
| download | Tango-00a491d9.tar.gz Tango-00a491d9.zip | |
merge
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.cs | 35 |
1 files changed, 8 insertions, 27 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 feed9e193..0235f8cca 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -42,7 +42,6 @@ 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. @@ -50,11 +49,6 @@ 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> @@ -138,28 +132,15 @@ namespace Tango.MachineStudio.UI.StudioApplication { String failed_reason = (sender as IMachineOperator).FailedStateException.Message; - if (!_isDialogShown) + ConnectionLostViewVM vm = new ConnectionLostViewVM() { - _isDialogShown = true; + Exception = failed_reason + }; - ConnectionLostViewVM vm = new ConnectionLostViewVM() - { - Exception = failed_reason, - AutoReconnect = true, - }; - - InvokeUI(() => - { - _notification.ShowModalDialog<ConnectionLostViewVM, ConnectionLostView>(vm, (x) => - { - _isDialogShown = false; - ReconnectionRequired?.Invoke(this, new EventArgs()); - }, () => - { - _isDialogShown = false; - }); - }); - } + InvokeUI(() => + { + _notification.ShowModalDialog<ConnectionLostViewVM, ConnectionLostView>(vm, (x) => { }, () => { }); + }); } } } @@ -291,7 +272,7 @@ namespace Tango.MachineStudio.UI.StudioApplication var eventLogger = TangoIOC.Default.GetInstance<IEventLogger>(); if (eventLogger != null) { - //eventLogger.Log(EventTypes.APPLICATION_TERMINATED, "Application Terminated!"); + eventLogger.Log(EventTypes.APPLICATION_TERMINATED, "Application Terminated!"); eventLogger.FlushAll(); } |
