Example #1
0
        private static void SaveCurrentLocation()
        {
            Position      pos   = FromGeoposition(CurrentPosition);
            LocationEntry entry = KnownLocations.IsKnown(pos);

            History.Add(entry);
            LocationHistoryDAC.Insert(entry);
        }
Example #2
0
        private void ClearLocationHistoryButton_Click(object sender, RoutedEventArgs e)
        {
            var result = MessageBox.Show("Some location-based recipes depend on historical location data. Proceed to clear the history?", Constants.APP_ID, MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                LocationHistoryDAC.Clear();
                LocationHelper.History.Clear();
                RefreshLocationHistoryButton_Click(null, null);
            }
        }
Example #3
0
 public static void LoadHistory()
 {
     History.Clear();
     History.AddRange(LocationHistoryDAC.FetchAll());
 }