Esempio n. 1
0
 void Instance_OnEventRaised(object sender, Event myEvent)
 {
     if (myEvent.Severity == Event.EventSeverity.Error)
     {
         InfoPopup errorInfo = new InfoPopup();
         errorInfo.Content = myEvent ;
         errorInfo.IsOpen = true;
     }
 }
 void Instance_OnEventRaised(object sender, Event myEvent)
 {
     if (myEvent is EventErrorAuth
         || myEvent is EventErrorConnection
         || myEvent is EventErrorProtocol
         || myEvent is EventErrorRegistration)
     {
         Middle.Alert.Instance.AlertOpen(myEvent.Message, "error2_design", Alert.Buttons.Ok);
         Notification.DismissNotification(myEvent);
     }
 }
Esempio n. 3
0
        private void Notifications_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
                case NotifyCollectionChangedAction.Add:
                    {
                        if (_content.Content != null)
                        {
                            _eventToDisplay = Notification.GetFirstEvent<Event>();

                            _display.Stop();
                            _display.Start();
                        }
                        else
                        {
                            _content.Content = Notification.GetFirstEvent<Event>();
                        }
                        break;
                    }
                case NotifyCollectionChangedAction.Remove:
                    {
                        foreach (Event item in e.OldItems)
                        {
                            if (item == _content.Content)
                            {
                                _content.Content = null;
                                break;
                            }
                        }

                        if (_content.Content != null)
                        {
                            _eventToDisplay = Notification.GetFirstEvent<Event>();

                            _display.Stop();
                            _display.Start();
                        }
                        else
                        {
                            _content.Content = Notification.GetFirstEvent<Event>();
                        }

                        break;
                    }
                case NotifyCollectionChangedAction.Reset:
                    {
                        _content.Content = null;
                        break;
                    }
            }

            RefreshNavigation();
        }
        void Notification_NegotiateAddNotification(Event myEvent, NegotiateNotification negotiateNotification)
        {
            EventHeadlineMessage messageEvent = myEvent as EventHeadlineMessage;

            if (messageEvent != null)
            {
                // don't notify if reader is open
                negotiateNotification.Raise = false;
            }
        }
Esempio n. 5
0
 public void Clear()
 {
     _content.Content = null;
     _eventToDisplay = null;
 }
Esempio n. 6
0
        private void Redisplay()
        {
            if (_eventToDisplay != null)
            {
                _content.Content = _eventToDisplay;
                _eventToDisplay = null;

                RefreshNavigation();
            }
        }