Esempio n. 1
0
		public void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
		{
			if (e.SelectedItem == null) return; // has been set to null, do not 'process' tapped event
			var memberBarrier = ((ListView)sender).SelectedItem as MemberBarriers;
			((ListView)sender).SelectedItem = null; // de-select the row
			Navigation.PushModalAsync(new BarrierStrategyModal(SelectedUser, null, memberBarrier));
		}
		void OnSelection (object sender, SelectedItemChangedEventArgs e)
		{
			if (e.SelectedItem == null) {
				return; //ItemSelected is called on deselection, which results in SelectedItem being set to null
			}

			Sections s = (Sections)e.SelectedItem;

			switch (s.SectionName) {
			case "Geometric Brownian Motion":
				SimulatingAndAnalyzingAssetPrices.RandomWalk rw = new SimulatingAndAnalyzingAssetPrices.RandomWalk (10.0);
				Navigation.PushAsync (new BrownianMotionChartPage (rw.BrownianSeq, rw.BrownianSeq1, rw.BrownianSeq2));
				break;
			case "MSFT Actual vs. GBM":
				var item = e.SelectedItem;
				Navigation.PushAsync (new CompareMsftHistoricalVolDriftChartPage ());
				break;
			case "Msft vs. Improved GBM":
				//			this is not properly implemented. needs non optimized drift/vol  
				//			SimulatingAndAnalyzingAssetPrices.RandomWalk rw = new SimulatingAndAnalyzingAssetPrices.RandomWalk (10.0);
							Navigation.PushAsync (new CompareMsftGbmChartPage ());
				break;
			}
			;

			((ListView)sender).SelectedItem = null; 
		}
Esempio n. 3
0
        private async void FoodList_OnItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null) return;
            var selectedItem = vm.FoodItems.First(x => x.Name == (e.SelectedItem as Food).Name);

            await Navigation.PushAsync(new FoodDetailPage(new FoodDetailViewModel(selectedItem)), true);
        }
Esempio n. 4
0
        // Determines what happens when an element from the list is chosen by the user.
        void Onselected(object sender, SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null){
                return;
            }

            // This deselects the item after it is selected.
            ((ListView)sender).SelectedItem = null;
            var select = e.SelectedItem as OnlineVViewModel;

            if (Helpers.Settings.SpeechSetting)
            {
                CrossTextToSpeech.Current.Speak(select.Title);
            }

            VideoPage temp = new VideoPage(select.Title, select.URL);
            if (Device.OS == TargetPlatform.iOS)
            {
                NavigationPage.SetHasNavigationBar(temp, true);
            }
            else
            {
                NavigationPage.SetHasNavigationBar(temp, false);
            }

            // Show the selected video to the user.
            Navigation.PushAsync(temp);
        }
Esempio n. 5
0
 private async void OrderList_OnItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     if (e.SelectedItem == null) return;
     var selectedItem = e.SelectedItem as OrderItemViewModel;
     var orderDetailVm = await vm.GetViewModelForOrderDetail(selectedItem);
     await  Navigation.PushAsync(new OrderDetailsPage(orderDetailVm), true);
 }
 public void OnSelect(object sender, SelectedItemChangedEventArgs e)
 {
     if (EditMode)
     {
         // Get the item selected
         var rcLD = (ListData)e.SelectedItem;
         // Display the Details view.
         var view = new ListDataDetailsView(_sListType, rcLD);
         Navigation.PushAsync(view);
     }
     else
     {
         // get the item selected
         var ListD = (ListData)e.SelectedItem;
         switch (_sListType)
         {
             case "ITEMTYPE":
                 App.selectedItemType = ListD.ListDesc;
                 break;
             case "ACTIVITYTYPE":
                 App.selectedActivityType = ListD.ListDesc;
                 break;
             case "MANUFACTURER":
                 // get the item selected
                 var ListI = (ListItem)e.SelectedItem;
                 App.selectedManufacturer = ListI.ListDesc;
                 break;
         }
         // tell the navigator to show the new view
         Navigation.PopAsync();
     }
 }
		void DeviceSelected (object sender, SelectedItemChangedEventArgs e)
		{
			var device = e.SelectedItem as IDevice;
			if (device != null) {
				App.BluetoothAdapter.ConnectToDevice(device);
			}
		}
		public void OnListItemSelected (object sender, SelectedItemChangedEventArgs e)
		{
			if (e.SelectedItem != null) {
				if (e.SelectedItem is CategoryViewModel) {
					Category selectedCategory = ((CategoryViewModel)e.SelectedItem).Category;

					//probably should not display category at all, but now its better than crash
					if (selectedCategory.Articles.Count == 0)
						return; 
				
					ContentPage nextPage;
					if (selectedCategory.Articles.Count > 1) {
						nextPage = new ArticleListPage () { ViewModel = new ArticleListViewModel (selectedCategory)  };
					} else {
						nextPage = new TextArticlePage () { ViewModel = new ArticleViewModel (selectedCategory.Articles [0]) };
					}
					Navigation.PushAsync (nextPage);
				} else if (e.SelectedItem is ArticleViewModel) {
					ArticleViewModel selectedSearchArtile = (ArticleViewModel)e.SelectedItem;
					var articlePage = new TextArticlePage () { ViewModel = selectedSearchArtile };
					Navigation.PushAsync (articlePage);						
				}
				myListView.SelectedItem = null;
			}
		}
        // Event handlers
        public async void OnSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var todo = e.SelectedItem as TodoItemViewModel;

            if (todo != null)
            {
                var detailsView = new TodoItemDetailsView();
                detailsView.BindingContext = todo;

                await Navigation.PushAsync(detailsView);
            }

            //if (Device.OS != TargetPlatform.iOS && todo != null)
            //{
            //    // Not iOS - the swipe-to-delete is discoverable there
            //    if (Device.OS == TargetPlatform.Android)
            //    {
            //        await DisplayAlert(todo.Name, "Press-and-hold to delete task " + todo.Name, "Got it!");
            //    }
            //    else
            //    {
            //        // Windows, not all platforms support the Context Actions yet
            //        if (await DisplayAlert("Delete?", "Do you wish to delete " + todo.Name + "?", "Delete", "Cancel"))
            //        {
            //            await DeleteItem(todo);
            //        }
            //    }
            //}
            // prevents background getting highlighted
            todoList.SelectedItem = null;
        }
 private void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     var listView = sender as CustomListView;
     if (listView != null) {
         listView.SelectedItem = null;
     }
     var todoModel = e.SelectedItem as TodoModel;
     if (todoModel != null) {
         var todoDetails = new TodoDetailsPage (rootPage, todoModel);
         todoDetails.BackButtonClicked += (s, arg) => {
             contentPageArea.Children.Remove (todoDetails);
         };
         todoDetails.RemoveButtonClicked += (sender1, args) => {
             App.DataBase.RemoveTodo (todoModel.Id);
             ResetListData ();
             contentPageArea.Children.Remove (todoDetails);
         };
         todoDetails.SaveButtonClicked += (sender1, args) => {
             var todo = args.Todo;
             App.DataBase.AddOrUpdateTodo (todo);
             ResetListData ();
             contentPageArea.Children.Remove (todoDetails);
         };
         contentPageArea.Children.Add (todoDetails, new Rectangle (0f, 0f, 1f, 1f), AbsoluteLayoutFlags.All);
     }
 }
		public async void OnListItemSelected(object sender, SelectedItemChangedEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine("hmm");

			try
			{
				categoryList.ScrollTo(categoryList.SelectedItem, ScrollToPosition.Center, true);
				EventCategoryListItem selectedCategory = categoryList.SelectedItem as EventCategoryListItem;
				categoryImage.Source = selectedCategory.ImageSource;
				await Task.Delay(500);
				categoryImage.IsVisible = true;
				categoryImage.FadeTo(0, 300, null);
				await categoryImage.ScaleTo(2, 150, null);
				categoryList.IsVisible = false;
				await categoryImage.ScaleTo(4, 150, null);
				categoryImage.Scale = 1;
				categoryImage.Opacity = 1;
				categoryImage.IsVisible = false;
				searchBar.Text = "#" + selectedCategory.Category;
				categoryList.SelectedItem = null;
			}
			catch (Exception ex)
			{

			}


		}
		void OnItemSelected (object sender, SelectedItemChangedEventArgs e) {

			var property = (PersonViewModel.Property)e.SelectedItem;
			System.Diagnostics.Debug.WriteLine ("Property clicked " + property.Type + " " + property.Value);

			switch (property.Type) {
			case PersonViewModel.PropertyType.Email:
				// use OpenUri
//				Device.OpenUri (new Uri ("mailto:"+property.Value));
				// or use platform-specific code
				PhoneFeatureService.Email (property.Value);
				break;
			case PersonViewModel.PropertyType.Twitter:
				PhoneFeatureService.Tweet (property.Value);
				break;
			case PersonViewModel.PropertyType.Url:
				PhoneFeatureService.Browse (property.Value);
				break;
			case PersonViewModel.PropertyType.Phone:
				PhoneFeatureService.Call (property.Value);
				break;
			case PersonViewModel.PropertyType.Address:
				PhoneFeatureService.Map (property.Value);
				break;
			}
		}
		public void OnItemSelected (object sender, SelectedItemChangedEventArgs e) {
			var r = (Restaurant)e.SelectedItem;

			var rPage = new RestaurantDetail();
			rPage.BindingContext = r;
			Navigation.PushAsync(rPage);
		}
		void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
		{
			var todoItem = e.SelectedItem as TodoItem;
			var todoPage = new TodoItemPage ();
			todoPage.BindingContext = todoItem;
			Navigation.PushAsync (todoPage);
		}
		void ListPages_ItemSelected (object sender, SelectedItemChangedEventArgs e)
		{
			if (e.SelectedItem != null) {
				this.Navigation.PushAsync ((Page)e.SelectedItem);
			}
			listPages.SelectedItem = null;
		}
Esempio n. 16
0
        void AnswerList_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            if (Device.OS == TargetPlatform.Android)
            {

            }
        }
Esempio n. 17
0
        private async void List_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var vm = e.SelectedItem as ExampleViewCellModel;
            var list = sender as ListView;

            if (vm == null || list == null)
            {
                return;
            }

            var pageType = _pages[vm];

            // create the page object
            var page = Activator.CreateInstance(pageType) as Page;

            if (page == null)
            {
                await MainPage.DisplayAlert("Error", "Couldn't display page.", "OK");
                return;
            }

            page.Title = vm.Title;

            var animation = vm.TappedAnimation as IAsyncCommand;
            var reset = vm.Reset;

            if (animation != null)
            {
                await animation.ExecuteAsync(null);
            }

            await MainPage.Navigation.PushAsync(page, true);
            list.SelectedItem = null;
            reset.Execute(null);
        }
Esempio n. 18
0
 public void OnListItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     if (e.SelectedItem != null) {
         Action action = ((Setting)e.SelectedItem).Action;
         action ();
         myListView.SelectedItem = null;
     }
 }
        void Handle_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var monkey = ((ListView)sender).SelectedItem as Monkey;
            if (monkey == null)
                return;


        }
Esempio n. 20
0
 void ExtendedListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     if (ItemSelectedCommand != null && e.SelectedItem != null)
     {
         ItemSelectedCommand.Execute(e.SelectedItem);
         SelectedItem = null;
     }
 }
        //        public void OnDelete (object sender, EventArgs e)
        //        {
        //            //Person p = new Person ();
        //
        //            var x1 = (MenuItem)sender;
        //            var x2 = x1.BindingContext;
        //            Person x3 = (Person)x2;
        //            x3.del (x3.key);
        //
        //            MessagingCenter.Send (this, "delete");
        //            this.Navigation.PushAsync (new FootballPlayerPage ());
        //
        //
        //
        //        }
        void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null) {
                return; //ItemSelected is called on deselection, which results in SelectedItem being set to null
            }

            this.Navigation.PushAsync (new FootballPlayerDetailsPage (e.SelectedItem));
        }
Esempio n. 22
0
		private async void itemSelected(object sender, SelectedItemChangedEventArgs e)
		{
			var item = ((ListView)sender).SelectedItem as StoreViewModel; 
			if (item != null)
			{
				((ListView)sender).SelectedItem = null;
			}
		}
		public void OnItemSelected (object sender, SelectedItemChangedEventArgs e) {
			var p = e.SelectedItem as Person;
			var em = new EmployeeXaml();

			var pvm = new PersonViewModel (p, favoritesRepository);
			em.BindingContext = pvm;
			Navigation.PushAsync(em);
		}
Esempio n. 24
0
 void OnSelection(object sender, SelectedItemChangedEventArgs e)
 {
     if (e.SelectedItem == null)
     {
         return;
     }
     DisplayAlert("augewählte Kategorie", e.SelectedItem.ToString(), "Ok");
 }
        private void OnDelete(object sender, EventArgs e)
        {
            var item = ((MenuItem)sender).CommandParameter as ContactItem;
            var args = new SelectedItemChangedEventArgs(item);

            if (_vm.DeleteCommand.CanExecute(args))
                _vm.DeleteCommand.Execute(args);
        }
Esempio n. 26
0
 void OnSelection(object sender, SelectedItemChangedEventArgs e)
 {
     if (e.SelectedItem == null) {
         return; //ItemSelected is called on deselection, which results in SelectedItem being set to null
     }
     DisplayAlert ("Item Selected", e.SelectedItem.ToString (), "Ok");
     //((ListView)sender).SelectedItem = null; //uncomment line if you want to disable the visual selection state.
 }
Esempio n. 27
0
 void TheList_ItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     if (theList.SelectedItem == null)
         return;
     Global.CurrentExhibition = theList.SelectedItem as Exhibition;
     theList.SelectedItem = null;
     Navigation.PushModalAsync (new PageExhibition (), true);
 }
Esempio n. 28
0
 private async void SitesListViewOnItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     _app.CurrentSite = e.SelectedItem as Site;
     LeftMenu.BindingContext = _app.CurrentSite;
     LeftMenu.Groups.Clear();
     LeftMenu.ToggleSubsiteMenu();
     await LeftMenu.GetGroups();
 }
Esempio n. 29
0
        async void EventSelectedAsync(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var selectedItem = e.SelectedItem as Event;
            await Navigation.PushAsync(new DetailofEvents(selectedItem));

            eventsView.SelectedItem = null;
        }
Esempio n. 30
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var listView = ((ListView)sender);
            var hero     = (Model.Result)listView.SelectedItem;

            listView.SelectedItem = null;
            if (hero != null && _viewModel.HeroeSelected != hero)
            {
                _viewModel.HeroeSelected = hero;
                Navigation.PushAsync(new DetailsPage());
            }
        }
        async void MyList_ItemSelected(System.Object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (((ListView)sender).SelectedItem == null)
            {
                return;
            }
            var content = e.SelectedItem as TaskModel;

            await Navigation.PushModalAsync(new DashboardDetailView(content));

            ((ListView)sender).SelectedItem = null;
        }
Esempio n. 32
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var category  = (Category)e.SelectedItem;
            var locations = dataService.FilterLocations(category.ServiceType);

            var resultsViewModel = new ResultsViewModel
            {
                Locations = locations
            };

            Navigation.PushAsync(new LocationsPage(resultsViewModel));
        }
Esempio n. 33
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var book = e.SelectedItem as Book;
            await Navigation.PushAsync(new BookDetailViewPage(book));

            Contactlist.SelectedItem = null;
        }
Esempio n. 34
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var option = e.SelectedItem as Option;
            await Navigation.PushAsync(new MainPage(option));

            FirstList.SelectedItem = null;
        }
Esempio n. 35
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var contact = e.SelectedItem as Contact;
            await Navigation.PushAsync(new ContactDetailPage(contact));

            listView.SelectedItem = null;
        }
Esempio n. 36
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var device = e.SelectedItem as ROEquipmentModel;

            if (device == null)
            {
                return;
            }

            Navigation.PushAsync(new ROEquipmentInfoPage(_flow, device, _businness));

            listV.SelectedItem = null;
        }
Esempio n. 37
0
        private void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var selectedNote = ((NoteViewItem)e.SelectedItem);

            Vm.NoteSelected(selectedNote);

            NoteListView.SelectedItem = null;
        }
Esempio n. 38
0
        async void SensorsRecord_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var sensorRecord = e.SelectedItem as SensorsRecord;

            await Navigation.PushAsync(new PatientHealthDetail(sensorRecord));

            sensorsRecordsListView.SelectedItem = null;
        }
Esempio n. 39
0
        async void OnGuestSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var guest = e.SelectedItem as Guest;

            guestListView.SelectedItem = null;

            await Navigation.PushAsync(new GuestDetailPage(guest));
        }
Esempio n. 40
0
        async void OnItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var item = e.SelectedItem as MenuItemModel;

            if (item == null)
            {
                return;
            }

            await Navigation.PushModalAsync(new ItemDetail(item));

            listViewMenuItems.SelectedItem = null;
        }
Esempio n. 41
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var parameter = e.SelectedItem as Parameter;

            if (parameter == null)
            {
                return;
            }

            Navigation.PushAsync(new ParameterIconPage(parameter.operparamId, businessNameLab.Text, gongyiliucheng.Text, parameter.operparamName, parameter.operparamUnit));

            listV.SelectedItem = null;
        }
Esempio n. 42
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            Skill selectedSkill = e.SelectedItem as Skill;

            (sender as ListView).SelectedItem = null;

            DisplayAlert("Hello", "You tapped a skill!" + selectedSkill.Name, "OK!");
        }
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var version = e.SelectedItem as ViewModels.ArtifactVersionViewModel;

            var project = await MavenService.GetProjectAsync(viewModel.MavenArtifact, version.Version);

            if (project != null)
            {
                await Navigation.PushAsync(new ArtifactProjectPage(project, version.Version));
            }

            //listView.SelectedItem = null;
        }
Esempio n. 44
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var cliente = e.SelectedItem as ModelListClientes;

            DisplayAlert("Selected", "Cliente " + cliente.nombre, "OK");

            if (e.SelectedItem != null)
            {
                ModelProducto modelProducto = (ModelProducto)e.SelectedItem;
                Navigation.PushAsync(new CDetallesGeneral(cliente));
            }
            ((ListView)sender).SelectedItem = null;
        }
        void OnListItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            //((App)App.Current).ResumeAtTodoId = (e.SelectedItem as Asset);
            ((App)App.Current).ResumeAt = (e.SelectedItem as Asset).Id;
            System.Diagnostics.Debug.WriteLine("setting ResumeAt = " + (e.SelectedItem as Asset).Id);

            /*
             * await Navigation.PushAsync(new TodoItemPage
             * {
             * BindingContext = e.SelectedItem as Asset
             * });
             */
        }
        async void Handle_ItemSelectedAsync(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var song = ((ListView)sender).SelectedItem as Song;

            if (song != null)
            {
                var detailPage = new SongDetails()
                {
                    BindingContext = song
                };
                await Navigation.PushAsync(detailPage);
            }
        }
Esempio n. 47
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            FoodModels.Food f = e.SelectedItem as FoodModels.Food;
            if (f == null)
            {
                return;
            }

            await Navigation.PushAsync(new FoodDetailPage(f));

            // Manually deselect item.
            FoodListView.SelectedItem = null;
        }
        void OnItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var activity = e.SelectedItem as Activity;

            listView.SelectedItem = null;

            Navigation.PushAsync(new Profile(activity.UserId));
        }
Esempio n. 49
0
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (_ls.SelectedItem != null)
            {
                var data = (Announcements)e.SelectedItem;

                MessagingCenter.Send(data, "xas");

                Navigation.PushAsync(new ReadAnnouncPage(), true);

                _ls.SelectedItem = null;
            }
        }
        async void Sell_Car_Tap(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var listItem = e.SelectedItem as Car;

            await Navigation.PushModalAsync(new SellDetailsModalPage(listItem));

            ((ListView)sender).SelectedItem = null;
        }
        void OnActivitySelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var activity = e.SelectedItem as Activity;

            activityFeed.SelectedItem = null;

            Navigation.PushAsync(new UserProfilePage(activity.UserId));
        }
Esempio n. 52
0
        async void OnProductSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            if (HomepageListView.SelectedItem == null)
            {
                return;
            }

            var selectedProduct = e.SelectedItem as Product_Retailer;

            await Navigation.PushAsync(new ProductDetailPage(selectedProduct));

            HomepageListView.SelectedItem = null;
        }
Esempio n. 53
0
        void OnItemSelected(System.Object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            ListView lv = (ListView)sender;

            // this assumes your List is bound to a List<Club>
            //Club club = (Club)lv.SelectedItem;

            Contact contact = (Contact)lv.SelectedItem;


            // assuiming Club has an Id property
            Navigation.PushAsync(new MainPage(contact.ID));
        }
Esempio n. 54
0
 // inicia la pantalla del chat entre el conductor y el cliente
 void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
 {
     // si la seleccion no es nula
     if (_lstx.SelectedItem != null)
     {
         // castea Room por comodidad
         var selectRoom = (Room)_lstx.SelectedItem;
         // inicia la pantalla del chat
         Navigation.PushAsync(new ChatPage());
         // envia la instancia del chat seleccionado
         MessagingCenter.Send <RoomPage, Room>(this, "RoomProp", selectRoom);
     }
 }
Esempio n. 55
0
 void HandleItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
 {
     try
     {
         if (e.SelectedItem == null)
         {
             return;
         }
         var ItemSelectedMenu = (MenuLateral)e.SelectedItem;
         if (ItemSelectedMenu.id == 0)
         {
             db.DeleteUsuario();
             App.Current.MainPage = App.GetNavigationPage(new Views.Session.LoginPage());
         }
         else if (ItemSelectedMenu.id == 1)
         {
             App.MasterPageDetail.IsPresented = false;
             App.MasterPageDetail.Detail.Navigation.PushAsync(new MiPerfilPage());
         }
         else if (ItemSelectedMenu.id == 2)
         {
             App.MasterPageDetail.IsPresented = false;
             App.MasterPageDetail.Detail.Navigation.PushAsync(new MisContratosPage());
         }
         else if (ItemSelectedMenu.id == 3)
         {
             App.MasterPageDetail.IsPresented = false;
             App.MasterPageDetail.Detail.Navigation.PushAsync(new MisTurnosPage());
         }
         else if (ItemSelectedMenu.id == 4)
         {
             App.MasterPageDetail.IsPresented = false;
             App.MasterPageDetail.Detail.Navigation.PushAsync(new MisReservasPage());
         }
         else if (ItemSelectedMenu.id == 5)
         {
             App.MasterPageDetail.IsPresented = false;
             App.MasterPageDetail.Detail.Navigation.PushAsync(new MiPlanPage());
         }
         else if (ItemSelectedMenu.id == 6)
         {
             App.MasterPageDetail.IsPresented = false;
             App.MasterPageDetail.Detail.Navigation.PushAsync(new MiConfiguracionPage());
         }
         ((ListView)sender).SelectedItem = null;
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
     }
 }
        void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            // don't do anything if we just de-selected the row.
            if (e.SelectedItem == null)
            {
                return;
            }

            // Deselect the item.
            if (sender is ListView lv)
            {
                lv.SelectedItem = null;
            }
        }
Esempio n. 57
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var item = e.SelectedItem as UserInfo;

            if (item == null)
            {
                return;
            }

            await Navigation.PushAsync(new UserDetails(item));

            // Manually deselect item
            UsersListView.SelectedItem = null;
        }
Esempio n. 58
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var recipe = e.SelectedItem as Recipe;

            if (recipe == null)
            {
                return;
            }

            var detailPage = new RecipeDetailPage(recipe);
            await Navigation.PushAsync(detailPage);

            recipeList.SelectedItem = null;
        }
Esempio n. 59
-1
		void OnSelected(object sender, SelectedItemChangedEventArgs e)
		{
			if (e.SelectedItem == null)
			{
				return;
			}
		}
		void ServiceSelected (object sender, SelectedItemChangedEventArgs e)
		{
			var characteristic = e.SelectedItem as ICharacteristic;
			if (characteristic != null) {
				// todo
			}
		}