예제 #1
0
 public void SwitchItem(FavouriteItem item)
 {
     if (FirstCollection.Contains(item))
     {
         FirstCollection.Remove(item);
         SecondCollection.Add(item);
     }
     else
     {
         SecondCollection.Remove(item);
         FirstCollection.Add(item);
     }
 }
예제 #2
0
        public void ResetItems()
        {
            SwitchCollection.Clear();

            foreach (FavouriteItem item in SecondCollection)
            {
                SwitchCollection.Add(item);
            }
            foreach (FavouriteItem item in SwitchCollection)
            {
                FirstCollection.Add(item);
                SecondCollection.Remove(item);
            }
        }