diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-04-16 09:27:48 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-04-16 09:27:48 +0300 |
| commit | eafb576fe1bf76898b9cc17671a89d1585e2c8e4 (patch) | |
| tree | d833a983eb84c53b35b19a45af475aa3e88953c0 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications | |
| parent | cf441513c1010eb4363e985b3b7af61a8503456e (diff) | |
| parent | 53f93d7fd2d2aa4571bad6e93e0c519fce242753 (diff) | |
| download | Tango-eafb576fe1bf76898b9cc17671a89d1585e2c8e4.tar.gz Tango-eafb576fe1bf76898b9cc17671a89d1585e2c8e4.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs | 21 |
1 files changed, 17 insertions, 4 deletions
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; |
