From c02a988bda6724dcbd1d689be2010ce55de59368 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 25 Nov 2018 08:51:51 +0200 Subject: Storage Module! --- .../Notifications/DefaultNotificationProvider.cs | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (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 f03d9accd..f68d57805 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -35,12 +35,18 @@ namespace Tango.PPC.UI.Notifications /// public ObservableCollection NotificationItems { get; private set; } + /// + /// Gets the collection of taskbar items. + /// + public ObservableCollection TaskBarItems { get; private set; } + /// /// Initializes a new instance of the class. /// public DefaultNotificationProvider() { NotificationItems = new ObservableCollection(); + TaskBarItems = new ObservableCollection(); _pendingMessageBoxes = new ConcurrentQueue>(); _pendingDialogs = new ConcurrentQueue>(); @@ -441,5 +447,35 @@ namespace Tango.PPC.UI.Notifications LogManager.Log($"Popping out AppBarItem '{appBarItem.GetType().Name}'."); CurrentAppBarItem = null; } + + /// + /// Pushes the task bar item. + /// + /// The task bar item. + /// + public TaskBarItem PushTaskBarItem(TaskBarItem taskBarItem) + { + TaskBarItems.Add(taskBarItem); + return taskBarItem; + } + + /// + /// Handles the Push Task Bar Item event. + /// + /// + /// + public TaskBarItem PushTaskBarItem() where T : TaskBarItem + { + return PushTaskBarItem(Activator.CreateInstance()); + } + + /// + /// Pops the task bar item. + /// + /// + public void PopTaskBarItem(TaskBarItem taskBarItem) + { + TaskBarItems.Remove(taskBarItem); + } } } -- cgit v1.3.1