예제 #1
0
 private void initDatabase()
 {
     // Init the database
     databaseMgr = new DatabaseMgr();
     databaseMgr.init();
     //databaseMgr.DeleteAllData();
 }
예제 #2
0
        public void CallLogHelper(List <PhoneCall> phoneCallLog)
        {
            DatabaseMgr dbMgr = new DatabaseMgr();

            foreach (PhoneCall call in phoneCallLog)
            {
                dbMgr.AddCallLog(call);
            }
        }
예제 #3
0
        private void checkData()
        {
            DatabaseMgr databaseMgr = new DatabaseMgr();

            // Delete these three lines
            databaseMgr.retrieveCallLog();
            databaseMgr.retrieveFavorites();
            databaseMgr.retrieveMostFrequentLMLocations();
        }
예제 #4
0
        public List <PhoneCall> GetMostFrequentCallLog()
        {
            KeyValuePair <List <string>, List <PhoneCall> > callLogs;

            callLogs        = new DatabaseMgr().retrieveCallLog();
            allPhoneNumList = callLogs.Key;
            allCallLog      = callLogs.Value;

            return(mineCallLog());
        }
예제 #5
0
        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));
            }
        }