コード例 #1
0
 private void initDatabase()
 {
     // Init the database
     databaseMgr = new DatabaseMgr();
     databaseMgr.init();
     //databaseMgr.DeleteAllData();
 }
コード例 #2
0
ファイル: CallHistory.cs プロジェクト: SirishaV88/HelpMate
        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
ファイル: CallHistory.cs プロジェクト: SirishaV88/HelpMate
        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));
            }
        }