using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core;
namespace Tango.MachineStudio.Common.Notifications
{
///
/// Represents a Machine Studio "work-bar" item.
///
///
///
public class TaskItem : ExtendedObject, IDisposable
{
private INotificationProvider _notificationProvider;
///
/// Initializes a new instance of the class.
///
/// The notification provider.
public TaskItem(INotificationProvider notificationProvider)
{
_notificationProvider = notificationProvider;
}
private String _message;
///
/// Gets or sets the message.
///
public String Message
{
get { return _message; }
set { _message = value; RaisePropertyChangedAuto(); }
}
///
/// Removed this item from the queue.
///
public void Pop()
{
_notificationProvider.PopTaskItem(this);
}
///
/// Pushes this item to the queue.
///
public void Push()
{
_notificationProvider.PushTaskItem(this);
}
///
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
///
public void Dispose()
{
Pop();
}
}
}