Esempio n. 1
0
 private void ListView_OnItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
 {
     if (e.Item is OperationMessage item)
     {
         viewModel.SelectedOperation = item;
         viewModel.IsDetailPopupOpen = true;
     }
 }
 private void radListViewSurveys_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
 {
     if (e.Item != null)
     {
         Survey         survey     = (CaritaUAT.Models.Survey)e.Item;
         SurveyEditPage surveyPage = new SurveyEditPage(_patient, survey);
         Navigation.PushAsync(surveyPage);
     }
 }
Esempio n. 3
0
        private void radListViewPatients_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
        {
            if (e.Item != null)
            {
                CaritaUAT.Models.Patient thisPat = (CaritaUAT.Models.Patient)e.Item;

                HealthCardPatientPage patPage = new HealthCardPatientPage(thisPat);
                Navigation.PushAsync(patPage);
            }
        }
Esempio n. 4
0
        private async void lstNote_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
        {
            NoteDTO itemNote = e.Item as NoteDTO;

            if (itemNote != null)
            {
                await PopupNavigation.Instance.PushAsync(new GestionePopupNoteView(itemNote, null), false);
            }
            _vmNotesPageViewModel.IsAddNoteEnable = true;
        }
 /// <summary>
 /// Handles the ItemTapped event of the listView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="itemTappedEventArgs">The <see cref="Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs"/> instance containing the event data.</param>
 private void listView_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs itemTappedEventArgs)
 {
     //var sensorPlotPage = new SensorPlotPage();
     if (itemTappedEventArgs.Item is Sensor sensorItem)
     {
         //sensorPlotPage.BindingContext = sensorItem;
         var sensorListViewModel = (SensorListViewModel)this.BindingContext;
         // Navigate to sensor details view model (for plot, statistics, limits, and sensor settings)
         sensorListViewModel.NavigateToSensorDetailsPage(sensorItem);
     }
 }
Esempio n. 6
0
        private async void AddressList_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
        {
            Address address = (Address)e.Item;

            if (Device.RuntimePlatform == Device.iOS)
            {
                await Launcher.OpenAsync("http://maps.apple.com/?q=" + address.ToString());
            }
            else if (Device.RuntimePlatform == Device.Android)
            {
                await Launcher.OpenAsync("geo:0,0?q=" + address.ToString());
            }
        }
Esempio n. 7
0
        private async void EventsListView_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
        {
            var tappedEvent = EventsListView.SelectedItem;

            if (tappedEvent != null)
            {
                var eventsViewModel = BindingContext as EventsViewModel;

                if (eventsViewModel != null)
                {
                    await ViewsFactory.CreateViewFromEvent(tappedEvent, eventsViewModel, Navigation);
                }
            }
        }
Esempio n. 8
0
        private void ListView_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
        {
            if (!(e.Item is NavigationMenuItem item))
            {
                return;
            }

            if (!(Activator.CreateInstance(item.TargetType) is Page page))
            {
                Debug.WriteLine($"ListView_ItemTapped - PageActivator failed : {item.TargetType} could not be created");
                return;
            }

            page.Title = item.Title;

            this.Detail = new NavigationPage(page);

            // Hide the pane on app launch if we're not running on desktop
            if (Device.RuntimePlatform != "UWP")
            {
                this.IsPresented = false;
            }
        }
Esempio n. 9
0
 private async void EmailList_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
 {
     ContactsLib.Email email = (ContactsLib.Email)e.Item;
     await utils.Utility.SendEmail("", "", new List <String>() { email.ToString() });
 }
Esempio n. 10
0
        private void PhoneList_ItemTapped(object sender, Telerik.XamarinForms.DataControls.ListView.ItemTapEventArgs e)
        {
            Phone phone = (Phone)e.Item;

            utils.Utility.PlacePhoneCall(phone.ToString());
        }