using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using Tango.Core; namespace Tango.MachineStudio.Common.Notifications { public class BarItem : ExtendedObject, IDisposable { private INotificationProvider _notificationProvider; public FrameworkElement Element { get; set; } public BarItem(INotificationProvider notificationProvider) { _notificationProvider = notificationProvider; } public BarItem(INotificationProvider notificationProvider, FrameworkElement element) : this(notificationProvider) { Element = element; } /// /// Removed this item from the queue. /// public void Pop() { _notificationProvider.PopBarItem(this); } /// /// Pushes this item to the queue. /// public void Push() { _notificationProvider.PushBarItem(this); } /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// public void Dispose() { Pop(); } } }