예제 #1
0
        private void SupprimerCritere()
        {
            foreach (ReviewDisplay revD in ReviewsD.ToList())
            {
                int _nbTags       = revD.Tags.Count;
                int _nbUnselected = 0;
                if (revD.Tags.Contains(ReviewTypes.Drink.ToString()) && !_isDrinkChecked)
                {
                    _nbUnselected++;
                }
                if (revD.Tags.Contains(ReviewTypes.ToSee.ToString()) && !_isToSeeChecked)
                {
                    _nbUnselected++;
                }
                if (revD.Tags.Contains(ReviewTypes.Food.ToString()) && !_isFoodChecked)
                {
                    _nbUnselected++;
                }

                if (_nbTags == _nbUnselected)
                {
                    ReviewsD.Remove(revD);
                }
            }
        }
예제 #2
0
 private void RechercheTitre()
 {
     SetReviews();
     if (!EntryRecherche.Equals(""))
     {
         ReviewsD = new ObservableCollection <ReviewDisplay>(ReviewsD.Where(rev => rev.Titre.ToLower().Contains(EntryRecherche.ToLower())));
     }
 }
예제 #3
0
 private void AjouterCritere(string Tag)
 {
     foreach (ReviewDisplay revD in _loadedReviewsD)
     {
         if (revD.Tags.Contains(Tag) && !ReviewsD.Contains(revD))
         {
             ReviewsD.Add(revD);
         }
     }
 }
예제 #4
0
 private void ChangeTriRecent()
 {
     if (!_isTriRecent)
     {
         ReviewsD     = new ObservableCollection <ReviewDisplay>(ReviewsD.OrderByDescending(rev => rev.DatePublication));
         _isTriRecent = !_isTriRecent;
         SourceImageButtonTriRecent = "@drawable/arrow_up.png";
         SourceImageButtonTriAncien = "@drawable/arrow_down_gray.png";
     }
 }