コード例 #1
0
 public override void SetAllTwunches(IEnumerable <Twunch> twunches)
 {
     Twunches.Clear();
     foreach (var twunch in twunches)
     {
         Twunches.Add(new TwunchItemViewModel(twunch));
     }
 }
コード例 #2
0
        private void RefreshFilter()
        {
            CurrentLocation = string.Format(CultureInfo.InvariantCulture, "{0:0.000000}, {1:0.000000}", lastLocation.Latitude, lastLocation.Longitude);
            NotifyOfPropertyChange(() => CurrentLocation);

            Twunches.Clear();
            if (lastLocation.IsUnknown || allTwunches == null)
            {
                return;
            }
            foreach (var twunch in allTwunches)
            {
                if (!twunch.Coordinate.IsUnknown && twunch.Coordinate.GetDistanceTo(lastLocation) < 50000)
                {
                    Twunches.Add(new TwunchItemViewModel(twunch));
                }
            }
        }