aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-11-25 08:51:51 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-11-25 08:51:51 +0200
commitc02a988bda6724dcbd1d689be2010ce55de59368 (patch)
treef0e9bcc67c0db00fe04517b6bccbacb63a5214ac /Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications
parent88a0169f624c77b77b21a871ace9e51a9245807d (diff)
downloadTango-c02a988bda6724dcbd1d689be2010ce55de59368.tar.gz
Tango-c02a988bda6724dcbd1d689be2010ce55de59368.zip
Storage Module!
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);
+ }
}
}