From fc8f4f7a358640f8f6495397f822320f87018d04 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 4 Mar 2019 19:46:05 +0200 Subject: Fixed issue with Start/Stop App Button on PPC. Implemented new notifications design. --- .../Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs index 9cd34e67c..d7dca484e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -29,6 +29,7 @@ namespace Tango.PPC.UI.Notifications { private ConcurrentQueue> _pendingMessageBoxes; private ConcurrentQueue> _pendingDialogs; + private List _appButtons; private bool _notificationsVisible; /// @@ -60,6 +61,7 @@ namespace Tango.PPC.UI.Notifications TaskBarItems = new ObservableCollection(); _pendingMessageBoxes = new ConcurrentQueue>(); _pendingDialogs = new ConcurrentQueue>(); + _appButtons = new List(); PopNotificationCommand = new RelayCommand((x) => PopNotification(x)); @@ -521,6 +523,7 @@ namespace Tango.PPC.UI.Notifications /// The app button. public void PushAppButton(AppButton appButton) { + _appButtons.Insert(0, appButton); CurrentAppButton = appButton; } @@ -530,10 +533,9 @@ namespace Tango.PPC.UI.Notifications /// The app button. public void PopAppButton(AppButton appButton) { - if (CurrentAppButton == appButton) - { - CurrentAppButton = null; - } + _appButtons.RemoveAll(x => x == appButton); + + CurrentAppButton = _appButtons.FirstOrDefault(); } } } -- cgit v1.3.1