aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-10-29 15:55:21 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-10-29 15:55:21 +0200
commit4b789f33eadfc5cc1d937a80ce03ea8425955ffe (patch)
tree7dbbd0529a24f9ca064cab688a0d6d2b8b762ea1 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels
parent8f3baa0d9097aa6ed800863a4680608e867c809a (diff)
parent11fb700fcbc4627162a9c3f84b03b5016248bd97 (diff)
downloadTango-4b789f33eadfc5cc1d937a80ce03ea8425955ffe.tar.gz
Tango-4b789f33eadfc5cc1d937a80ce03ea8425955ffe.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs28
1 files changed, 24 insertions, 4 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
index 3f549598a..a6e6b7a4e 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
@@ -127,15 +127,31 @@ namespace Tango.PPC.Events.ViewModels
{
if (ev.NotificationTime != EventTypeNotificationTimes.None)
{
- CurrentEvents.Insert(0, ev);
+ if (!ev.EventType.Persistent)
+ {
+ CurrentEvents.Insert(0, ev);
+ }
+ else
+ {
+ HistoryEvents.Insert(0, ev);
+ }
var notificationItem = new MessageNotificationItem();
- notificationItem.CanClose = false;
+ notificationItem.CanClose = ev.EventType.Persistent;
notificationItem.Message = ev.EventType.Title;
notificationItem.ExpandedMessage = ev.EventType.Description;
notificationItem.Pressed += async (_, __) =>
{
- SelectedEventsSource = EventsSource.CURRENT;
+ if (!ev.EventType.Persistent)
+ {
+ SelectedEventsSource = EventsSource.CURRENT;
+ }
+ else
+ {
+ SelectedEventsSource = EventsSource.HISTORY;
+ notificationItem.Dispose();
+ }
+
SelectedEvent = ev;
await NavigationManager.NavigateTo<EventsModule>();
};
@@ -158,6 +174,10 @@ namespace Tango.PPC.Events.ViewModels
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Critical;
notificationItem.Priority = NotificationItem.NotificationPriority.Critical;
break;
+ case EventTypeCategories.Success:
+ notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Success;
+ notificationItem.Priority = NotificationItem.NotificationPriority.VeryHigh;
+ break;
}
NotificationProvider.PushNotification(notificationItem);
@@ -175,7 +195,7 @@ namespace Tango.PPC.Events.ViewModels
{
InvokeUI(() =>
{
- if (ev.NotificationTime != EventTypeNotificationTimes.None)
+ if (ev.NotificationTime != EventTypeNotificationTimes.None && !ev.EventType.Persistent)
{
CurrentEvents.Remove(ev);
HistoryEvents.Insert(0, ev);