Пример #1
0
        public UcwaAppErrorReportEventHandler OnErrorReported;                             // delegate for reporting errors on the callling UI thread

        public virtual void ForwardEventNotificationsReceived(UcwaEventsData events)
        {
            if (OnEventNotificationsReceived != null)
            {
                OnEventNotificationsReceived(events);
            }
        }
Пример #2
0
        void ProcessEventNotifications(UcwaEventsData events)
        {
            ShowEventNotifications(events);
            var meEvents = events.GetEventsBySender("me");

            if (meEvents != null)
            {
                ProcessMeEvents(meEvents);
            }
        }
Пример #3
0
        protected virtual async void DispatchToUIThreadReceivedEventNotifications(UcwaEventsData events)
        {
            if (this.OnEventNotificationsReceived != null)
            {
                await UcwaAppUtils.DispatchEventToUI(CoreDispatcherPriority.Normal,
                                                     new DispatchedHandler(() => { this.OnEventNotificationsReceived(events); }));
            }

            //foreach (var sender in eventsData.SenderNames)
            //{
            //    if (OnEventsReceived != null)
            //        await UcwaAppUtils.DispatchEventToUI(CoreDispatcherPriority.Normal,
            //            new DispatchedHandler(() => { OnEventsReceived(sender, eventsData.GetEventsBySender(sender)); }));
            //}
        }
Пример #4
0
        async void EventChannel_OnEventNotificationsReceived(UcwaEventsData events)
        {
            UcwaEventsData eventsData = events as UcwaEventsData;

            if (eventsData == null)
            {
                return;
            }
            if (this.OnEventNotificationsReceived != null)
            {
                await UcwaAppUtils.DispatchEventToUI(CoreDispatcherPriority.Normal,
                                                     new DispatchedHandler(() => { this.OnEventNotificationsReceived(eventsData); }));
            }

            foreach (var sender in eventsData.SenderNames)
            {
                if (OnEventsReceived != null)
                {
                    await UcwaAppUtils.DispatchEventToUI(CoreDispatcherPriority.Normal,
                                                         new DispatchedHandler(() => { OnEventsReceived(sender, eventsData.GetEventsBySender(sender)); }));
                }
            }
        }
Пример #5
0
        void ProcessEventNotifications(UcwaEventsData events)
        {
            var eventData = DateTime.Now.ToString() + "\r\n" + events.OuterXml + "\r\n";

            ShowEventNotifications(eventData);
        }
Пример #6
0
 void ShowEventNotifications(UcwaEventsData events)
 {
     textBoxEvents.Text = DateTime.Now.ToString() + "\r\n" + events.OuterXml + "\r\n";
 }