aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-02-11 15:45:20 +0200
committerAvi Levkovich <avi@twine-s.com>2020-02-11 15:45:20 +0200
commite6ba80fd76b3f7d0395e92e1499e586002b4cf53 (patch)
tree86fdc369c164d8ee0e5f640a538c1af79aab2c2b /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parentb9d37b2e3eef5f4b023b085b11a586e412749700 (diff)
parente9b269ae3f418e34934f23977656fe49c6ea42b5 (diff)
downloadTango-e6ba80fd76b3f7d0395e92e1499e586002b4cf53.tar.gz
Tango-e6ba80fd76b3f7d0395e92e1499e586002b4cf53.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs30
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;
+ });
+ });
+ }
}
}
}