Exemplo n.º 1
0
 public static Boolean isfavorite(PhotoItem photoItem)
 {
     return(Favorites.Contains(photoItem));
 }
Exemplo n.º 2
0
 public static void addtofavorite(PhotoItem photoItem)
 {
     Favorites.Add(photoItem);
 }
Exemplo n.º 3
0
 public static void deletePhotoItem(ObservableCollection <PhotoItem> PhotoItems, PhotoItem photoItem)
 {
     //AllLists.Where(p => p.category == photoItem.Category);
     temp = AllLists.Find(p => p.category == photoItem.Category);
     if (temp != null)
     {
         temp.list.Remove(photoItem);
     }
     PhotoItems.Remove(photoItem);
 }
Exemplo n.º 4
0
 public static void updatePhotoItemsAfterEdit(ObservableCollection <PhotoItem> PhotoItems, PhotoItem photoItem, String oldCategory)
 {
     AllLists.Where(p => p.category == photoItem.Category);
     temp = AllLists.Find(p => p.category == photoItem.Category);
     if (temp != null)
     {
         temp.list.Add(photoItem);
     }
     AllLists.Where(p => p.category == oldCategory);
     temp = AllLists.Find(p => p.category == oldCategory);
     if (temp != null)
     {
         temp.list.Remove(photoItem);
     }
     //PhotoItems.Add(photoItem);
 }
Exemplo n.º 5
0
        public static void updatePhotoItems(ObservableCollection <PhotoItem> PhotoItems, PhotoItem photoItem)
        {
            AllLists.Where(p => p.category == photoItem.Category);
            temp = AllLists.Find(p => p.category == photoItem.Category);
            if (temp != null)
            {
                temp.list.Add(photoItem);
                PhotoItems.Add(photoItem);
            }

            else
            {
                addCategory(photoItem.Category);
                updatePhotoItems(PhotoItems, photoItem);
            }
        }
Exemplo n.º 6
0
 public static void removefromfavorite(PhotoItem photoItem)
 {
     Favorites.Remove(photoItem);
 }