Ejemplo n.º 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);
            }
        }
        void ProcessEventNotifications(UcwaEventsData events)
        {
            ShowEventNotifications(events);
            var meEvents = events.GetEventsBySender("me");

            if (meEvents != null)
            {
                ProcessMeEvents(meEvents);
            }
        }
Ejemplo n.º 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)); }));
            //}
        }
        async void EventChannel_OnEventNotificationsReceived(UcwaEventsData eventsData)
        {
            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)); }));
                }
            }
        }
Ejemplo n.º 5
0
 void communication_ShowEvents(UcwaEventsData rawEvents)
 {
     textboxEvents.Text += rawEvents.OuterXml;
     textboxEvents.Text += Environment.NewLine + Environment.NewLine;
 }
 void ShowEventNotifications(UcwaEventsData events)
 {
     textBoxEvents.Text = DateTime.Now.ToString() + "\r\n" + events.OuterXml + "\r\n";
 }
Ejemplo n.º 7
0
        void ProcessEventNotifications(UcwaEventsData events)
        {
            var eventData = DateTime.Now.ToString() + "\r\n" + events.OuterXml + "\r\n";

            ShowEventNotifications(eventData);
        }
 void ProcessEventsData(UcwaEventsData eventsData)
 {
 }