Exemplo n.º 1
0
        void appDataModel_Recents_Changed(object sender, EventArgs.FavoritesChangedEventArgs e)
        {
            e.newFavorites.Sort(new RecentLastAccessComparer());

            UIAction(() => Recents.Clear());
            e.newFavorites.ForEach(recent => UIAction(() => Recents.Add(recent)));
        }
Exemplo n.º 2
0
        void appDataModel_Favorites_Changed(object sender, EventArgs.FavoritesChangedEventArgs e)
        {
            if (LocationTracker.LocationKnown == true)
            {
                e.newFavorites.Sort(new FavoriteDistanceComparer(locationTracker.CurrentLocation));
            }

            UIAction(() => Favorites.Clear());
            e.newFavorites.ForEach(favorite => UIAction(() => Favorites.Add(favorite)));
        }
Exemplo n.º 3
0
        void appDataModel_Recents_Changed(object sender, EventArgs.FavoritesChangedEventArgs e)
        {
            Debug.Assert(e.error == null);

            if (e.error == null)
            {
                e.newFavorites.Sort(new RecentLastAccessComparer());

                UIAction(() => Recents.Clear());
                e.newFavorites.ForEach(recent => UIAction(() => Recents.Add(recent)));
            }
            else
            {
                ErrorOccured(this, e.error);
            }
        }
Exemplo n.º 4
0
        void appDataModel_Favorites_Changed(object sender, EventArgs.FavoritesChangedEventArgs e)
        {
            Debug.Assert(e.error == null);

            if (e.error == null)
            {
                if (LocationTracker.LocationKnown == true)
                {
                    e.newFavorites.Sort(new FavoriteDistanceComparer(locationTracker.CurrentLocation));
                }

                UIAction(() => Favorites.Clear());
                e.newFavorites.ForEach(favorite => UIAction(() => Favorites.Add(favorite)));
            }
            else
            {
                ErrorOccured(this, e.error);
            }
        }