Пример #1
0
        public void FavUp(RouteStopModel favorite)
        {
            int index = Favorites.IndexOf(favorite);

            if (index > 0)
            {
                CommonComponent.Current.UB.Favorites.PushBack(favorite.Route, favorite.Stop);
                Favorites.RemoveAt(index);
                Favorites.Insert(index - 1, favorite);
            }
        }
Пример #2
0
        public void FavDown(RouteStopModel favorite)
        {
            int index = Favorites.IndexOf(favorite);

            if (index < Favorites.Count - 1)
            {
                CommonComponent.Current.UB.Favorites.PushForward(favorite.Route, favorite.Stop);
                Favorites.RemoveAt(index);
                Favorites.Insert(index + 1, favorite);
            }
        }
Пример #3
0
 public void RemoveFavorite(RouteStopModel favorite)
 {
     CommonComponent.Current.UB.Favorites.Remove(favorite.Route, favorite.Stop);
     Favorites.Remove(favorite);
 }