示例#1
0
        void WindowNotifications_ShowDataCompleted(object sender, ShowNotificationsCompletedEventArgs e)
        {
            try
            {
                ListBoxNotification.Items.Clear();
                var notifications = e.Notifications;

                foreach (NotificationLog notification in notifications)
                {
                    NotificationListBoxUserControl notificationListBoxUserControl = new NotificationListBoxUserControl();
                    notificationListBoxUserControl.SetItemName(notification.ItemName);
                    notificationListBoxUserControl.SetTime(notification.DateTime);
                    notificationListBoxUserControl.SetDesription(notification.NotificationMsg);
                    notificationListBoxUserControl.SetHasFault(notification.HasFault);
                    notificationListBoxUserControl.SetCategory(notification.Category);

                    ListBoxNotification.Items.Add(notificationListBoxUserControl);
                }

                BusyIndicator.IsBusy = false;
            }
            catch (Exception ex)
            {
                Logger.LogIndustrialMonitoring(ex);
            }
        }
示例#2
0
        protected virtual void OnShowDataCompleted(ShowNotificationsCompletedEventArgs e)
        {
            EventHandler <ShowNotificationsCompletedEventArgs> handler = ShowDataCompleted;

            if (handler != null)
            {
                handler(this, e);
            }
        }