aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-03-04 19:46:05 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-03-04 19:46:05 +0200
commitfc8f4f7a358640f8f6495397f822320f87018d04 (patch)
treee185ab464f2cdfdf71ed473ca87d5044e6b04c23 /Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications
parentecd2a6146289cd6b3c3dd7c1153a5f9da16dd69c (diff)
downloadTango-fc8f4f7a358640f8f6495397f822320f87018d04.tar.gz
Tango-fc8f4f7a358640f8f6495397f822320f87018d04.zip
Fixed issue with Start/Stop App Button on PPC.
Implemented new notifications design.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs10
1 files changed, 6 insertions, 4 deletions
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<PendingNotification<MessageBoxVM, bool>> _pendingMessageBoxes;
private ConcurrentQueue<PendingNotification<DialogAndView, DialogViewVM>> _pendingDialogs;
+ private List<AppButton> _appButtons;
private bool _notificationsVisible;
/// <summary>
@@ -60,6 +61,7 @@ namespace Tango.PPC.UI.Notifications
TaskBarItems = new ObservableCollection<TaskBarItem>();
_pendingMessageBoxes = new ConcurrentQueue<PendingNotification<MessageBoxVM, bool>>();
_pendingDialogs = new ConcurrentQueue<PendingNotification<DialogAndView, DialogViewVM>>();
+ _appButtons = new List<AppButton>();
PopNotificationCommand = new RelayCommand<NotificationItem>((x) => PopNotification(x));
@@ -521,6 +523,7 @@ namespace Tango.PPC.UI.Notifications
/// <param name="appButton">The app button.</param>
public void PushAppButton(AppButton appButton)
{
+ _appButtons.Insert(0, appButton);
CurrentAppButton = appButton;
}
@@ -530,10 +533,9 @@ namespace Tango.PPC.UI.Notifications
/// <param name="appButton">The app button.</param>
public void PopAppButton(AppButton appButton)
{
- if (CurrentAppButton == appButton)
- {
- CurrentAppButton = null;
- }
+ _appButtons.RemoveAll(x => x == appButton);
+
+ CurrentAppButton = _appButtons.FirstOrDefault();
}
}
}