private void initDatabase() { // Init the database databaseMgr = new DatabaseMgr(); databaseMgr.init(); //databaseMgr.DeleteAllData(); }
public void CallLogHelper(List <PhoneCall> phoneCallLog) { DatabaseMgr dbMgr = new DatabaseMgr(); foreach (PhoneCall call in phoneCallLog) { dbMgr.AddCallLog(call); } }
private void checkData() { DatabaseMgr databaseMgr = new DatabaseMgr(); // Delete these three lines databaseMgr.retrieveCallLog(); databaseMgr.retrieveFavorites(); databaseMgr.retrieveMostFrequentLMLocations(); }
public List <PhoneCall> GetMostFrequentCallLog() { KeyValuePair <List <string>, List <PhoneCall> > callLogs; callLogs = new DatabaseMgr().retrieveCallLog(); allPhoneNumList = callLogs.Key; allCallLog = callLogs.Value; return(mineCallLog()); }
private async void SaveLocation(object sender, RoutedEventArgs e) { DatabaseMgr dbMgr = new DatabaseMgr(); if (geo == null) { geo = new Geolocator(); } geo.DesiredAccuracyInMeters = 25; Geoposition pos = await geo.GetGeopositionAsync(); double lat = pos.Coordinate.Point.Position.Latitude; double lon = pos.Coordinate.Point.Position.Longitude; if (locInput.Text != null) { dbMgr.AddLMLocation(new LMLocation(lat, lon, DateTime.Now, 1000000, locInput.Text)); NavigationService.Navigate(new Uri("/MainPage.xaml?goto=3", UriKind.Relative)); } }