diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-08 15:28:31 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-08 15:28:31 +0200 |
| commit | d1859415972bb991cba6639482c1cd2a9e19e8d8 (patch) | |
| tree | 93f688cdcf876c23072cf3de016c3811982fbd7e /Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications | |
| parent | 3cd59dd3b04168ad91cb1fe51231e9b3ddd74705 (diff) | |
| download | Tango-d1859415972bb991cba6639482c1cd2a9e19e8d8.tar.gz Tango-d1859415972bb991cba6639482c1cd2a9e19e8d8.zip | |
Implemented possible improvement for WebClient download speed.
Implemented PPC notifications priority.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications')
2 files changed, 11 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs index 65337a892..a8ac2b24b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -17,6 +17,8 @@ using Tango.Touch.Controls; using Tango.SharedUI; using System.Reflection; using Tango.Core.DI; +using System.ComponentModel; +using System.Windows.Data; namespace Tango.PPC.UI.Notifications { @@ -47,6 +49,11 @@ namespace Tango.PPC.UI.Notifications public ObservableCollection<NotificationItem> NotificationItems { get; private set; } /// <summary> + /// Gets the notification items view. + /// </summary> + public ICollectionView NotificationItemsView { get; private set; } + + /// <summary> /// Gets the collection of taskbar items. /// </summary> public ObservableCollection<TaskBarItem> TaskBarItems { get; private set; } @@ -66,6 +73,9 @@ namespace Tango.PPC.UI.Notifications PopNotificationCommand = new RelayCommand<NotificationItem>((x) => PopNotification(x)); NotificationItems.EnableCrossThreadOperations(); + + NotificationItemsView = CollectionViewSource.GetDefaultView(NotificationItems); + NotificationItemsView.SortDescriptions.Add(new SortDescription(nameof(NotificationItem.Priority), ListSortDirection.Descending)); } private MessageBoxVM _currentMessageBox; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/UpdateAvailableNotificationItemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/UpdateAvailableNotificationItemView.xaml index fc9b05b9b..1d4dd6fc7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/UpdateAvailableNotificationItemView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/NotificationItems/UpdateAvailableNotificationItemView.xaml @@ -8,7 +8,7 @@ xmlns:common="clr-namespace:Tango.PPC.Common.Converters" mc:Ignorable="d" x:Name="MessageNotificationItemControl" - d:DesignHeight="60" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:UpdateAvailableNotificationItem, IsDesignTimeCreatable=False}" MinHeight="90" Height="90" MaxHeight="150" Background="White"> + d:DesignHeight="60" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:UpdateAvailableNotificationItem, IsDesignTimeCreatable=False}" MinHeight="90" Height="90" MaxHeight="150" Background="{StaticResource TangoPrimaryBackgroundBrush}"> <Grid> <Border BorderThickness="0 0 0 2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Padding="15"> |
