private static void SaveCurrentLocation() { Position pos = FromGeoposition(CurrentPosition); LocationEntry entry = KnownLocations.IsKnown(pos); History.Add(entry); LocationHistoryDAC.Insert(entry); }
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); } }
public static void LoadHistory() { History.Clear(); History.AddRange(LocationHistoryDAC.FetchAll()); }