コード例 #1
0
        private async void TapPet(int id)
        {
            await Task.Run(() => {
                var searchResultPage = new SeeMyPetProfile(id);

                Device.BeginInvokeOnMainThread(() => {
                    Navigation.PushAsync(searchResultPage);
                });
            });
        }
コード例 #2
0
        private void userListView_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            if (isPetFollowingList)
            {
                var listView = (ListView)sender;

                var selectedLVWPAST = (ListViewWithPictureAndSomeText)listView.SelectedItem;

                if (GlobalVariables.ActualUsersEmail != selectedLVWPAST.user.Email)
                {
                    var searchResultPage = new SeeAnOwnerPage(selectedLVWPAST.user.id);

                    Navigation.PushAsync(searchResultPage);
                }
                else
                {
                    var searchResultPage = new MyAccountPage();

                    Navigation.PushAsync(searchResultPage);
                }
            }
            else
            {
                var listView = (ListView)sender;

                var selectedLVWPAST = (ListViewWithPictureAndSomeText)listView.SelectedItem;

                if (GlobalVariables.followersViewModel.IsMyPet(selectedLVWPAST.pet.id))
                {
                    var searchResultPage = new SeeMyPetProfile(selectedLVWPAST.pet.id);

                    Navigation.PushAsync(searchResultPage);
                }
                else
                {
                    var searchResultPage = new SeeAPetProfile(selectedLVWPAST.pet.id);

                    Navigation.PushAsync(searchResultPage);
                }
            }
        }