From e571f20e27c4fca6bb6efe03d6427a1f332f9830 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 27 May 2018 19:33:15 +0300 Subject: Working on panel pc. --- .../PPC/Tango.PPC.Common/Notification/TaskItem.cs | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs new file mode 100644 index 000000000..b9ffa4a72 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.PPC.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(); + } + } +} -- cgit v1.3.1