aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-02-14 22:51:52 +0200
committerRoy <roy.mail.net@gmail.com>2018-02-14 22:51:52 +0200
commitb934b152eea671fa06678baa0cdf7f8811e6d2d9 (patch)
tree35c092bff1e06905c70c23e60ed1a9fdf9825e5a /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs
parent12967bd645e92f7b08b8d323b93225e027ad69f0 (diff)
downloadTango-b934b152eea671fa06678baa0cdf7f8811e6d2d9.tar.gz
Tango-b934b152eea671fa06678baa0cdf7f8811e6d2d9.zip
MERGE.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs
new file mode 100644
index 000000000..8d3cefa40
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs
@@ -0,0 +1,46 @@
+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;
+ }
+
+ /// <summary>
+ /// Removed this item from the queue.
+ /// </summary>
+ public void Pop()
+ {
+ _notificationProvider.PopBarItem(this);
+ }
+
+ /// <summary>
+ /// Pushes this item to the queue.
+ /// </summary>
+ public void Push()
+ {
+ _notificationProvider.PushBarItem(this);
+ }
+
+ /// <summary>
+ /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// </summary>
+ public void Dispose()
+ {
+ Pop();
+ }
+ }
+}