aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarItem.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarPriority.cs15
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/INotificationProvider.cs16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs25
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml14
6 files changed, 23 insertions, 60 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarItem.cs
index fdd66a56b..1c47d2a97 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarItem.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarItem.cs
@@ -13,16 +13,6 @@ namespace Tango.PPC.Common.Notifications
/// </summary>
public abstract class AppBarItem : ItemBase
{
- private AppBarPriority _priority;
- public AppBarPriority Priority
- {
- get { return _priority; }
- set { _priority = value; RaisePropertyChangedAuto(); }
- }
- public AppBarItem()
- {
- Priority = AppBarPriority.Normal;
- }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarPriority.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarPriority.cs
deleted file mode 100644
index bd8547f5d..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/AppBarPriority.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.PPC.Common.Notifications
-{
- public enum AppBarPriority
- {
- Low,
- Normal,
- High
- }
-}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/INotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/INotificationProvider.cs
index 950b8d23f..c4e82b7d2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/INotificationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/INotificationProvider.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -24,24 +23,19 @@ namespace Tango.PPC.Common.Notifications
ObservableCollection<NotificationItem> NotificationItems { get; }
/// <summary>
- /// Gets the notification items view.
- /// </summary>
- ICollectionView NotificationItemsView { get; }
-
- /// <summary>
/// Gets the collection of taskbar items.
/// </summary>
ObservableCollection<TaskBarItem> TaskBarItems { get; }
/// <summary>
- /// Gets the application bar items.
+ /// Gets the current application bar item.
/// </summary>
- ObservableCollection<AppBarItem> AppBarItems { get; }
+ AppBarItem CurrentAppBarItem { get; }
/// <summary>
- /// Gets a value indicating whether this instance has any application bar items.
+ /// Gets a value indicating whether this instance has application bar item.
/// </summary>
- bool HasAppBarItems { get; }
+ bool HasAppBarItem { get; }
/// <summary>
/// Gets a value indicating whether this instance has notification items.
@@ -182,7 +176,7 @@ namespace Tango.PPC.Common.Notifications
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
- T PushAppBarItem<T>() where T : AppBarItem;
+ AppBarItem PushAppBarItem<T>() where T : AppBarItem;
/// <summary>
/// Pops the application bar item.
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs
index 6a29511a9..c96fe9dee 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs
@@ -14,22 +14,22 @@ namespace Tango.PPC.Common.Notifications
/// </summary>
public abstract class NotificationItem : ItemBase
{
- public enum NotificationPriority
- {
- Low,
- Normal,
- High,
- VeryHigh,
- Critical,
- }
-
/// <summary>
/// Initializes a new instance of the <see cref="NotificationItem"/> class.
/// </summary>
public NotificationItem() : base()
{
CanClose = true;
- Priority = NotificationPriority.Normal;
+ }
+
+ private bool _isExpanded;
+ /// <summary>
+ /// Gets or sets a value indicating whether the notification panel is expanded.
+ /// </summary>
+ public bool IsExpanded
+ {
+ get { return _isExpanded; }
+ set { _isExpanded = value; RaisePropertyChangedAuto(); }
}
private bool _canClose;
@@ -43,11 +43,6 @@ namespace Tango.PPC.Common.Notifications
}
/// <summary>
- /// Gets or sets the notification priority.
- /// </summary>
- public NotificationPriority Priority { get; set; }
-
- /// <summary>
/// Called when the item has been pressed.
/// </summary>
protected override void OnPreesed()
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs
index 7d85ef6a7..a9de336a1 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs
@@ -77,12 +77,11 @@ namespace Tango.PPC.Common.Notifications.NotificationItems
/// <param name="expandedMessage">The expanded message.</param>
/// <param name="type">The type.</param>
/// <param name="pressedAction">The pressed action.</param>
- public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type, Action pressedAction, NotificationPriority priority = NotificationPriority.Normal) : this()
+ public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type, Action pressedAction) : this()
{
Message = message;
ExpandedMessage = expandedMessage;
MessageType = type;
- Priority = priority;
Pressed += (_, __) => pressedAction?.Invoke();
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
index cab40e50e..33c58f51e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
@@ -111,20 +111,20 @@
</touch:TouchIcon.Style>
</touch:TouchIcon>
- <StackPanel Margin="10 5 40 5" VerticalAlignment="Center">
- <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock>
+ <StackPanel Margin="10 0 0 0" VerticalAlignment="Center">
+ <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center"></TextBlock>
-
- <TextBlock Margin="0 5 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="Wrap" VerticalAlignment="Center" >
- <!--<TextBlock.Opacity>
+ <Canvas Margin="0 5 0 0">
+ <TextBlock Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" TextWrapping="Wrap" VerticalAlignment="Center">
+ <TextBlock.Opacity>
<MultiBinding Converter="{StaticResource heightToOpacityConverter}">
<Binding Path="ActualHeight" ElementName="MessageNotificationItemControl" />
<Binding Path="MinHeight" ElementName="MessageNotificationItemControl" />
<Binding Path="MaxHeight" ElementName="MessageNotificationItemControl" />
</MultiBinding>
- </TextBlock.Opacity>-->
+ </TextBlock.Opacity>
</TextBlock>
-
+ </Canvas>
</StackPanel>
</DockPanel>
</ContentControl>