aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-11-25 10:44:37 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-11-25 10:44:37 +0200
commitbeff6af103bb0ae9b9147a907c6567bdb33abd00 (patch)
tree375eefd654c25f3b68c0cf5b3612df844a140d8e /Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications
parent57f20269fbb4c591aa73c9f5e50118310cc4892e (diff)
parentdff24e56a8906b8c9b355cf407f25f4b793beafe (diff)
downloadTango-beff6af103bb0ae9b9147a907c6567bdb33abd00.tar.gz
Tango-beff6af103bb0ae9b9147a907c6567bdb33abd00.zip
merge
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs36
1 files changed, 36 insertions, 0 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 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
@@ -36,11 +36,17 @@ namespace Tango.PPC.UI.Notifications
public ObservableCollection<NotificationItem> NotificationItems { get; private set; }
/// <summary>
+ /// Gets the collection of taskbar items.
+ /// </summary>
+ public ObservableCollection<TaskBarItem> TaskBarItems { get; private set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="DefaultNotificationProvider"/> class.
/// </summary>
public DefaultNotificationProvider()
{
NotificationItems = new ObservableCollection<NotificationItem>();
+ TaskBarItems = new ObservableCollection<TaskBarItem>();
_pendingMessageBoxes = new ConcurrentQueue<PendingNotification<MessageBoxVM, bool>>();
_pendingDialogs = new ConcurrentQueue<PendingNotification<DialogAndView, DialogViewVM>>();
@@ -441,5 +447,35 @@ namespace Tango.PPC.UI.Notifications
LogManager.Log($"Popping out AppBarItem '{appBarItem.GetType().Name}'.");
CurrentAppBarItem = null;
}
+
+ /// <summary>
+ /// Pushes the task bar item.
+ /// </summary>
+ /// <param name="taskBarItem">The task bar item.</param>
+ /// <returns></returns>
+ public TaskBarItem PushTaskBarItem(TaskBarItem taskBarItem)
+ {
+ TaskBarItems.Add(taskBarItem);
+ return taskBarItem;
+ }
+
+ /// <summary>
+ /// Handles the Push Task Bar Item event.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns></returns>
+ public TaskBarItem PushTaskBarItem<T>() where T : TaskBarItem
+ {
+ return PushTaskBarItem(Activator.CreateInstance<T>());
+ }
+
+ /// <summary>
+ /// Pops the task bar item.
+ /// </summary>
+ /// <param name="taskBarItem"></param>
+ public void PopTaskBarItem(TaskBarItem taskBarItem)
+ {
+ TaskBarItems.Remove(taskBarItem);
+ }
}
}