private void ItemTapped(ItemTapCommandContext context)
        {
            var tappedItem = context.Item;

            //add your logic here
            Application.Current.MainPage.DisplayAlert("", "You've selected " + tappedItem, "OK");
        }
Beispiel #2
0
        private void OnItemTapped(ItemTapCommandContext context)
        {
            InfoLigne infoLigne = context.Item.As <InfoLigne>();

            infoLigne.SetSelected(!infoLigne.Selected);
            UpdateLignesSelectedProperties();
        }
        private void OnNextCommand(ItemTapCommandContext context)
        {
            var navigationService = DependencyService.Get <INavigationService>();

            var category = context.Item as Category;

            if (category != null)
            {
                if (category.Examples.Count > 1)
                {
                    navigationService.NavigateToAsync <CategoryViewModel>(category);
                }
                else if (category.Examples.Count > 0)
                {
                    var example = category.Examples[0];

                    navigationService.NavigateToAsync <ExampleViewModel>(example);
                }
            }
            else
            {
                var example = context.Item as Example;

                if (example != null)
                {
                    navigationService.NavigateToAsync <ExampleViewModel>(example);
                }
            }
        }
Beispiel #4
0
        private void OnNextCommand(ItemTapCommandContext context)
        {
            var navigationService = DependencyService.Get <INavigationService>();

            if (context.Item is Example)
            {
                navigationService.NavigateToAsync <ExampleViewModel>(context.Item);
            }
        }
        private async Task ItemTapped(ItemTapCommandContext context)
        {
            Monkey monkey = (Monkey)context.Item;

            //FreshMvvm Display Alert
            await CoreMethods.DisplayAlert("Monkey Tapped", $"{monkey.Name} was clicked", "OK");

            //Non-FreshMvvm Display Alert
            //await Application.Current.MainPage.DisplayAlert("Monkey Tapped", $"{monkey.Name} was clicked", "OK");
        }
        void ScheduleItemSlotTap(ItemTapCommandContext context)
        {
            var item = (ScheduleItemSlot)context.Item;

            if (item.IsFull != true)
            {
                SetCurrentScheduleItemSlotRowId(item.RowId);
            }
            CalcScheduleItemSlots();
        }
Beispiel #7
0
        private void OnFavorisTapped(ItemTapCommandContext context)
        {
            _eventAggregator.GetEvent <AnalyticsEvent>().Publish(new AnalyticsReport("Sélection d'un favori"));
            base.NavigationService.GoBackAsync();
            Favori favori = context.Item.As <Favori>();
            IEnumerable <LigneSens> lignes = favori.Lignes.Select((InfoLigne x) => new LigneSens
            {
                Ligne       = x.Ligne,
                Sens        = x.Sens,
                Destination = x.Destination
            });

            _mapManager.SetLignes(lignes);
            _mapManager.SetExtent(favori.MapExtent);
        }
Beispiel #8
0
 /// <summary>
 /// Item tapped of listview.
 /// </summary>
 /// <param name="context">Context.</param>
 private async Task ItemTapped(ItemTapCommandContext context)
 {
     var tappedItem = context.Item;
     //add your logic here
     await App.Navigator.PushAsync(new InstructionPage(), true);
 }
        private void SelectItem(ItemTapCommandContext selected)
        {
            var conversation = selected.Item as ConversationItem;

            _navigationService.Navigate <ConversationViewModel, ConversationItem>(conversation);
        }
        async Task PatientItemTap(ItemTapCommandContext context)
        {
            var item = (PatientOrderItem)context.Item;

            await OpenPatientOrderItem(item);
        }
Beispiel #11
0
        async void ItemTap(ItemTapCommandContext context)
        {
            var item = (Order)context.Item;

            await ItemOpen(item);
        }