From c400fa026cdb2bc5c1c5c25f5bfae37461e87cab Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 11 Apr 2018 14:50:47 +0300 Subject: Added Disconnect & Connect requests. Fixed issue with Machine Connection View Scanning. Fixed issue with ShowModalDialog close event.. Added ConnectedMachineView. Added TransferRate for Adapters. --- .../Notifications/DefaultNotificationProvider.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index 1c9b8732f..cb36d8d29 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -112,14 +112,16 @@ namespace Tango.MachineStudio.UI.Notifications dialog.DataContext = context; Action onAcceptAction = null; + Action onCancelAction = null; + onAcceptAction = new Action(() => { dialog.Close(); onAccept(context); context.Accepted -= onAcceptAction; + context.Canceled -= onCancelAction; }); - Action onCancelAction = null; onCancelAction = new Action(() => { dialog.Close(); @@ -129,6 +131,7 @@ namespace Tango.MachineStudio.UI.Notifications onCancel(); } + context.Accepted -= onAcceptAction; context.Canceled -= onCancelAction; }); @@ -163,14 +166,16 @@ namespace Tango.MachineStudio.UI.Notifications dialog.DataContext = context; Action onAcceptAction = null; + Action onCancelAction = null; + onAcceptAction = new Action(() => { dialog.Close(); onAccept(context); context.Accepted -= onAcceptAction; + context.Canceled -= onCancelAction; }); - Action onCancelAction = null; onCancelAction = new Action(() => { dialog.Close(); @@ -180,6 +185,7 @@ namespace Tango.MachineStudio.UI.Notifications onCancel(); } + context.Accepted -= onAcceptAction; context.Canceled -= onCancelAction; }); @@ -213,14 +219,16 @@ namespace Tango.MachineStudio.UI.Notifications dialog.DataContext = context; Action onAcceptAction = null; + Action onCancelAction = null; + onAcceptAction = new Action(() => { dialog.Close(); onAccept(context); context.Accepted -= onAcceptAction; + context.Canceled -= onCancelAction; }); - Action onCancelAction = null; onCancelAction = new Action(() => { dialog.Close(); @@ -231,6 +239,7 @@ namespace Tango.MachineStudio.UI.Notifications } context.Canceled -= onCancelAction; + context.Accepted -= onAcceptAction; }); context.Accepted += onAcceptAction; @@ -279,15 +288,18 @@ namespace Tango.MachineStudio.UI.Notifications } dialog.DataContext = context; + Action onCancelAction = null; Action onAcceptAction = null; + onAcceptAction = new Action(() => { dialog.Close(); onAccept(context); + + context.Canceled -= onCancelAction; context.Accepted -= onAcceptAction; }); - Action onCancelAction = null; onCancelAction = new Action(() => { dialog.Close(); @@ -298,6 +310,7 @@ namespace Tango.MachineStudio.UI.Notifications } context.Canceled -= onCancelAction; + context.Accepted -= onAcceptAction; }); context.Accepted += onAcceptAction; -- cgit v1.3.1