コード例 #1
0
        private async void onEventTapped(object sender, ItemTappedEventArgs e)
        {
            RaiseContentViewUpdateEvent?.Invoke(this, null);
            UpdatedContentEventArgs updatedContentEventArgs = null;
            EventDetailsPage        eventDetailsPageBuf     = null;

            await Task.Factory.StartNew(() =>
            {
                EventModel selectedEvent = e.Item as EventModel;
                eventDetailsPageBuf      = new EventDetailsPage(selectedEvent);
                eventDetailsPageBuf.RaiseContentViewUpdateEvent += eventsRouter;
                updatedContentEventArgs = new UpdatedContentEventArgs(
                    UpdatedContentEventArgs.EContentUpdateType.Push, eventDetailsPageBuf,
                    eventDetailsPageBuf.BindableViewModel);
            });

            RaiseContentViewUpdateEvent?.Invoke(this, updatedContentEventArgs);
        }
コード例 #2
0
        private async void cameraEventsListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            RaiseContentViewUpdateEvent?.Invoke(this, null);
            EventModel selectedSensorEvent = e.SelectedItem as EventModel;
            UpdatedContentEventArgs updatedContentEventArgs = null;
            EventDetailsPage        eventDetailsPageBuf     = null;

            await Task.Factory.StartNew(() =>
            {
                eventDetailsPageBuf = new EventDetailsPage(selectedSensorEvent);
                eventDetailsPageBuf.RaiseContentViewUpdateEvent += eventsRouter;
            });

            await Task.Factory.StartNew(() =>
                                        updatedContentEventArgs = new UpdatedContentEventArgs(
                                            UpdatedContentEventArgs.EContentUpdateType.Push, eventDetailsPageBuf, eventDetailsPageBuf.BindableViewModel
                                            ));

            RaiseContentViewUpdateEvent?.Invoke(this, updatedContentEventArgs);
        }