Ejemplo n.º 1
0
        private async void LvUpComing_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            var upComingMovie = e.ItemData as UpComingMovie;

            if (upComingMovie != null)
            {
                string trailorLink = upComingMovie.MovieTrailor;
                await Navigation.PushAsync(new VideoPage(trailorLink));
            }
        }
 private async void LvPatient_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     if (e.ItemData != null)
     {
         var item = (Patient)e.ItemData;
         if (await MessageService.Instance.ShowAsyncYesNo("Deseja enviar este usuário ao atendimento?"))
         {
             _viewModel.PromoverAppointment(item);
         }
     }
 }
Ejemplo n.º 3
0
 private void LvAction_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     if (Settings.Type != "host")
     {
         if (e.ItemData != null)
         {
             var item = (ActionModel)e.ItemData;
             _viewModel.ItemTapped(item);
         }
     }
 }
 private void LvActions_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     if (e.ItemData is DialogAction dialogAction)
     {
         if (_viewModel.CompletionSource != null)
         {
             _selectedItem = dialogAction;
             PopupNavigation.Instance.PopAsync();
         }
     }
 }
Ejemplo n.º 5
0
        private async void LstSubjects_ItemSelected(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            LstSubjects.IsEnabled = false;
            add_subject.IsEnabled = false;
            Subject subject = await fireBaseHelper.GetSubject((e.ItemData as Subject).SubjectID);

            await Navigation.PushAsync(new SubjectSelected(subject));

            LstSubjects.IsEnabled = true;
            add_subject.IsEnabled = true;
        }
Ejemplo n.º 6
0
        private void tapItem(Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            var item = (Track)e.ItemData;

            var parametr = new NavigationParameters();

            parametr.Add("item", item);

            Track = item;

            navigationService.NavigateAsync("PlayerPage", parametr);
        }
Ejemplo n.º 7
0
        async void OnTapSimilarsList(object sender, ItemTappedEventArgs args)
        {
            if (!(args.ItemData is Artiste item) || item.ProviderId == null || item.ProviderId == "")
            {
                return;
            }

            await Navigation.PushAsync(new MyArtisteDetailPage(new MyArtistDetailsViewModel(item)));

            // Manually deselect item
            listViewSimilars.SelectedItem = null;
        }
        private async void menu_list_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            AppFeature tappedItem = e.ItemData as AppFeature;

            switch (tappedItem.Title)
            {
            case "Users not following you back":
                var not_followin_back_page_instance = new NotFollowingMePage();
                not_followin_back_page_instance.InstaApi          = InstaApi;
                not_followin_back_page_instance.CurrentUserObject = CurrentUserObject;

                ObservableCollection <InstagramUser> usernames = new ObservableCollection <InstagramUser>();

                foreach (var u in not_following_back)
                {
                    var added_user = new InstagramUser
                    {
                        FullName = u.FullName,
                        Username = u.UserName,
                        ImageUrl = u.ProfilePicUrl,
                        UserId   = u.Pk
                    };
                    usernames.Add(added_user);
                }

                not_followin_back_page_instance.not_following_back = usernames;
                await Navigation.PushAsync(not_followin_back_page_instance);

                break;

            case "Users you don't follow back":
                var you_dont_follow_page_instance = new YouDontFollowPage();
                you_dont_follow_page_instance.InstaApi = InstaApi;

                var usernames1 = new List <InstagramUser>();

                foreach (var u in i_dont_follow_back)
                {
                    var added_user = new InstagramUser
                    {
                        FullName = u.FullName,
                        Username = u.UserName,
                        ImageUrl = u.ProfilePicUrl
                    };
                    usernames1.Add(added_user);
                }

                you_dont_follow_page_instance.i_dont_follow_back = usernames1;
                await Navigation.PushAsync(you_dont_follow_page_instance);

                break;
            }
        }
Ejemplo n.º 9
0
        private void DeviceListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            var selectedDevice      = e.ItemData as DeviceViewModel;
            var _settingsDevisePage = new SettingsDevisePage(selectedDevice);

            Navigation.PushModalAsync(_settingsDevisePage);
        }
Ejemplo n.º 10
0
        private async void lstVerse_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (e.ItemData == null)
            {
                return;
            }
            VerseSearch verse  = e.ItemData as VerseSearch;
            Shabad      shabad = await _con.Table <Shabad>().FirstOrDefaultAsync(a => a.VerseID == verse.VerseID);

            await Navigation.PushAsync(new ShabadDetails(shabad.ShabadID, verse.VerseID));

            lstVerse.SelectedItem = null;
        }
Ejemplo n.º 11
0
 async void lstShabad_ItemTapped(System.Object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     if (ToolbarVisible)
     {
         await EditToolbar.TranslateTo(0, 50, 100, Easing.SinOut);
     }
     else
     {
         await EditToolbar.TranslateTo(0, 0, 100, Easing.SinOut);
     }
     //EditToolbar.Opacity = (EditToolbar.Opacity == 1) ? 0 : 1;
     ToolbarVisible = !ToolbarVisible;
     //if(string.IsNullOrEmpty(Title))
     //    ToggleSimilarShabadButton(false);
 }
Ejemplo n.º 12
0
        private async void NavigationDrawerList_OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            var item = (MenuPageItem)e.ItemData;
            var page = item.TargetType;

            if (page != typeof(LogoutPage))
            {
                Detail      = new NavigationPage((Page)Activator.CreateInstance(page));
                IsPresented = false;
            }
            else
            {
                await Navigation.PushAsync(new Login());
            }
        }
        async void Member_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (e.ItemData == null)
            {
                return;
            }

            var member = (HBTMember)e.ItemData;
            //member.SetAppContext(app_context);

            ////lvMemberList.SelectedItem = null;

            //var member_detail = new MemberDetailPage(app_context, member);

            //await Application.Current.MainPage.Navigation.PushAsync(new NavigationPage(member_detail), true);
        }
Ejemplo n.º 14
0
        private async void view_event(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            LstEvents.IsEnabled = false;
            if (e != null)
            {
                ScheduleAppointment appointment = new ScheduleAppointment();
                appointment.Subject   = (e.ItemData as EventModel).Name;
                appointment.Notes     = (e.ItemData as EventModel).Description;
                appointment.StartTime = Convert.ToDateTime((e.ItemData as EventModel).StartEventDate);
                appointment.EndTime   = Convert.ToDateTime((e.ItemData as EventModel).EndEventDate);
                appointment.Color     = (e.ItemData as EventModel).Color;

                await PopupNavigation.PushAsync(new EventSelected(appointment, "MyAccount"));
            }
            LstEvents.IsEnabled = true;
        }
Ejemplo n.º 15
0
        private void MembresListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (e.ItemData == null || MembresListView.ItemsSource == null)
            {
                return;
            }

            List <Member> list = new List <Member>();

            list.AddRange(MembresListView.ItemsSource as IEnumerable <Member>);
            int index = list.IndexOf(MembresListView.SelectedItem as Member);

            if (CarouselMembres.Position != index)
            {
                CarouselMembres.Position = index;
            }
        }
        private void SubListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            var item = (SubCategoryItem)e.ItemData;

            Global.Instance.myData.HistoriJawaban += item.SubCategoryID.ToString() + ",";
            if (item.SubCategoryItems == null)
            {
                var detailPage = new DetailPageMakanan();
                detailPage.BindingContext = item;
                Navigation.PushAsync(detailPage);
            }
            else
            {
                var subPage = new SubListViewGridMakanan();
                subPage.BindingContext = item;
                Navigation.PushAsync(subPage);
            }
        }
Ejemplo n.º 17
0
        private void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (tappedItem != null && tappedItem.IsVisible)
            {
                var previousIndex = listview.DataSource.DisplayItems.IndexOf(tappedItem);

                tappedItem.IsVisible = false;
            }

            if (tappedItem == (e.ItemData as Contact))
            {
                tappedItem = null;
                return;
            }

            tappedItem           = e.ItemData as Contact;
            tappedItem.IsVisible = true;
        }
Ejemplo n.º 18
0
        void Handle_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            var tempListView = sender as Syncfusion.ListView.XForms.SfListView;

            for (int i = 0; i < 2; i++)
            {
                var tempItem = (listView.ItemsSource as ObservableCollection <MenuCollectionModel>)[i];
                if ((e.ItemData as MenuCollectionModel) != tempItem)
                {
                    tempItem.FontColor = Color.FromHex("#8e8e92");
                }
            }

            var temp = e.ItemData as MenuCollectionModel;

            temp.FontColor = Color.FromHex("#007ad0");
            //navigationDrawer.ContentView = new Archive_Default(temp.MessageContent, (e.ItemData as MenuCollectionModel).MenuItem).Content;
            navigationDrawer.ToggleDrawer();
        }
Ejemplo n.º 19
0
        private void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (tappedItem != null && tappedItem.IsVisible)
            {
                var previousIndex = listview.DataSource.DisplayItems.IndexOf(tappedItem);

                tappedItem.IsVisible = false;

                if (Device.RuntimePlatform != Device.macOS)
                {
                    Device.BeginInvokeOnMainThread(() => { listview.RefreshListViewItem(previousIndex, previousIndex, false); });
                }
            }

            if (tappedItem == (e.ItemData as Contact))
            {
                if (Device.RuntimePlatform == Device.macOS)
                {
                    var previousIndex = listview.DataSource.DisplayItems.IndexOf(tappedItem);
                    Device.BeginInvokeOnMainThread(() => { listview.RefreshListViewItem(previousIndex, previousIndex, false); });
                }

                tappedItem = null;
                return;
            }

            tappedItem           = e.ItemData as Contact;
            tappedItem.IsVisible = true;

            if (Device.RuntimePlatform == Device.macOS)
            {
                var visibleLines = this.listview.GetVisualContainer().ScrollRows.GetVisibleLines();
                var firstIndex   = visibleLines[visibleLines.FirstBodyVisibleIndex].LineIndex;
                var lastIndex    = visibleLines[visibleLines.LastBodyVisibleIndex].LineIndex;
                Device.BeginInvokeOnMainThread(() => { listview.RefreshListViewItem(firstIndex, lastIndex, false); });
            }
            else
            {
                var currentIndex = listview.DataSource.DisplayItems.IndexOf(e.ItemData);
                Device.BeginInvokeOnMainThread(() => { listview.RefreshListViewItem(currentIndex, currentIndex, false); });
            }
        }
Ejemplo n.º 20
0
        private async void LstSubjects_ItemSelected(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (!busyindicator.IsVisible)
            {
                if (App.CheckConnection())
                {
                    if (await App.userExists(App.UserUID))
                    {
                        LstSubjects.IsEnabled = false;
                        add_subject.IsEnabled = false;
                        bool    connextion = true;
                        Subject subject    = new Subject();
                        try
                        {
                            subject = await fireBaseHelper.GetSubject((e.ItemData as Subject).SubjectID);
                        }
                        catch (Exception)
                        {
                            connextion = false;
                            await Navigation.PushAsync(new NoInternetConnectionPage("notApp"));
                        }
                        if (connextion)
                        {
                            await Navigation.PushAsync(new SubjectSelected(subject));

                            LstSubjects.IsEnabled = true;
                            add_subject.IsEnabled = true;
                        }
                    }
                    else
                    {
                        await DisplayAlert("Something went wrong...", "", "OK");

                        App.Current.MainPage = new NavigationPage(new LogIn());
                    }
                }
                else
                {
                    await Navigation.PushAsync(new NoInternetConnectionPage("notApp"));
                }
            }
        }
Ejemplo n.º 21
0
        private async void DevicesListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            var selectedDevice = e.ItemData as DeviceViewModel;
            var answer         = await DisplayAlert("Добавить устройство?", string.Format("Добавление {0}", selectedDevice.DeviceName), "Yes", "No");

            if (answer)
            {
                //todo: добавить процедуру добавления комнат
                await DisplayAlert("Da", "da", "ok");
            }

            await Navigation.PopModalAsync();

            return;
        }
Ejemplo n.º 22
0
        private void ListView_OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            var item     = (VMMenu)e.ItemData;
            var instance = Activator.CreateInstance(item.Type);

            if (item.Title == "Minhas Indicações")
            {
                Util.Navigation.AddToNavigation(Session.Navigation.Navigation, new Lista());
            }
            else if (item.Title == "Indicar Empresa")
            {
                Util.Navigation.AddToNavigation(Session.Navigation.Navigation, new NovoLead());
            }
            else
            {
                Util.Navigation.AddToNavigation(Session.Navigation.Navigation, new ComoFunciona());
            }

            listView.SelectedItem = null;
        }
Ejemplo n.º 23
0
        private void ListView_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            var item = e.ItemData as HomePageMasterMenuItem;

            if (item == null)
            {
                return;
            }

            Page page = null;

            if (item.Id == (int)MenuPage.Home)
            {
                page   = new HomeTabbedPage();
                Detail = new NavigationPage(page);
            }
            else if (item.Id == (int)MenuPage.About)
            {
                page = new AboutUsSimplePage()
                {
                    Title = item.Title
                };
                Application.Current.MainPage.Navigation.PushAsync(page);
            }
            else if (item.Id == (int)MenuPage.Contact)
            {
                page = new ContactUsPage()
                {
                    Title = item.Title
                };
                Application.Current.MainPage.Navigation.PushAsync(page);
            }
            else
            {
                page   = new HomeTabbedPage();
                Detail = new NavigationPage(page);
            }

            IsPresented = false;
            MasterPage.ListView.SelectedItem = null;
        }
 // event triggered when a review is tapped
 private async void ReviewsView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     var review = e.ItemData as Review;
     await Navigation.PushPopupAsync(new ReviewsPopup(review));
 }
Ejemplo n.º 25
0
 private void HourTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     ViewModel.NewSchedule(e.ItemData);
 }
Ejemplo n.º 26
0
        private void listView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
            var result = e.ItemData as Product;

            this.Navigation.PushAsync(new ProductDetail(result));
        }
Ejemplo n.º 27
0
 private void MenuItemListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     _vm.GoToPage((MenuItems)e.ItemData);
 }
Ejemplo n.º 28
0
 private async void ListView_OnItemTapped(object sender, ItemTappedEventArgs e)
 {
     await _viewModel.OnItemSelected(e.ItemData as TacheReadDto);
 }
 private async void SfListViewCountries_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     mainPageViewModel.setSelectedCountry(e.ItemData as Country);
 }
Ejemplo n.º 30
0
 private void listDivision_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
 {
     var selectedItem = e.ItemData as ListDivision;
     // Application.Current.MainPage = new frmDivision(selectedItem);
 }