aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs32
1 files changed, 4 insertions, 28 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 a6e6b7a4e..d2a730cd7 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,31 +127,15 @@ namespace Tango.PPC.Events.ViewModels
{
if (ev.NotificationTime != EventTypeNotificationTimes.None)
{
- if (!ev.EventType.Persistent)
- {
- CurrentEvents.Insert(0, ev);
- }
- else
- {
- HistoryEvents.Insert(0, ev);
- }
+ CurrentEvents.Insert(0, ev);
var notificationItem = new MessageNotificationItem();
- notificationItem.CanClose = ev.EventType.Persistent;
+ notificationItem.CanClose = false;
notificationItem.Message = ev.EventType.Title;
notificationItem.ExpandedMessage = ev.EventType.Description;
notificationItem.Pressed += async (_, __) =>
{
- if (!ev.EventType.Persistent)
- {
- SelectedEventsSource = EventsSource.CURRENT;
- }
- else
- {
- SelectedEventsSource = EventsSource.HISTORY;
- notificationItem.Dispose();
- }
-
+ SelectedEventsSource = EventsSource.CURRENT;
SelectedEvent = ev;
await NavigationManager.NavigateTo<EventsModule>();
};
@@ -160,23 +144,15 @@ namespace Tango.PPC.Events.ViewModels
{
case EventTypeCategories.Info:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Info;
- notificationItem.Priority = NotificationItem.NotificationPriority.Normal;
break;
case EventTypeCategories.Warning:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Warning;
- notificationItem.Priority = NotificationItem.NotificationPriority.High;
break;
case EventTypeCategories.Error:
notificationItem.MessageType = MessageNotificationItem.MessageNotificationItemTypes.Error;
- notificationItem.Priority = NotificationItem.NotificationPriority.VeryHigh;
break;
case EventTypeCategories.Critical:
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;
}
@@ -195,7 +171,7 @@ namespace Tango.PPC.Events.ViewModels
{
InvokeUI(() =>
{
- if (ev.NotificationTime != EventTypeNotificationTimes.None && !ev.EventType.Persistent)
+ if (ev.NotificationTime != EventTypeNotificationTimes.None)
{
CurrentEvents.Remove(ev);
HistoryEvents.Insert(0, ev);