コード例 #1
0
 private void FilterSerach_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (StatutListContainer.IsVisible)
     {
         StatutList.ItemsSource = Statuts.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         StatutSearch           = e.NewTextValue;
     }
     if (EntiteListContainer.IsVisible)
     {
         EntiteList.ItemsSource = Entities.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         EntitySearch           = e.NewTextValue;
     }
     if (ServiceListContainer.IsVisible)
     {
         ServiceList.ItemsSource = Services.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         ServiceSearch           = e.NewTextValue;
     }
     if (DemandeurListContainer.IsVisible)
     {
         DemandeurList.ItemsSource = Demandeurs.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         DemandeurSearch           = e.NewTextValue;
     }
     if (SiteListContainer.IsVisible)
     {
         SiteList.ItemsSource = Sites.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         SiteSearch           = e.NewTextValue;
     }
     if (TypeListContainer.IsVisible)
     {
         TypeList.ItemsSource = Types.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         TypeSearch           = e.NewTextValue;
     }
 }
コード例 #2
0
        private void DemandeurList_ItemSelected(object sender, EventArgs e)
        {
            var SelectedItem = ((StackLayout)sender).BindingContext as AtCheckedItem;

            SelectedItem.IsSelected = !SelectedItem.IsSelected;

            DemandeurBox.IsVisible = Demandeurs.Where(item => item.IsSelected).ToList().Count != 0 ? true : false;
        }
コード例 #3
0
        private void ApplyFilter_Clicked(object sender, EventArgs e)
        {
            FilterElements.Statuts    = Statuts.Where(item => item.IsSelected).Select(item => item.Name).ToList();
            FilterElements.Entities   = Entities.Where(item => item.IsSelected).Select(item => item.Name).ToList();
            FilterElements.Services   = Services.Where(item => item.IsSelected).Select(item => item.Name).ToList();
            FilterElements.Demandeurs = Demandeurs.Where(item => item.IsSelected).Select(item => item.Name).ToList();

            MessagingCenter.Instance.Send(sender: this, AppConstants.FILTER_AT, FilterElements);
        }