示例#1
0
        private void LoadDatabase()
        {
            var tmp = CSVReader.FromStream(Application.GetResourceStream(new Uri("Model/database.csv", UriKind.Relative)).Stream);

            foreach (List <string> row in tmp)
            {
                WhereFiModel r = new WhereFiModel();

                r.Latitude  = Convert.ToDouble(row[1]);
                r.Longitude = Convert.ToDouble(row[0]);
                r.Name      = row[2].Trim();

                database.Add(r);
            }
        }
示例#2
0
        private void Pushpin_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WhereFiModel r = (WhereFiModel)((Pushpin)sender).DataContext;

            NavigationService.Navigate(new Uri("/DetailsPage.xaml?name=" + r.Name + "&description=" + r.Description + "&lat1=" + watcher.Position.Location.Latitude + "&lon1=" + watcher.Position.Location.Longitude + "&lat2=" + r.Latitude + "&lon2=" + r.Longitude, UriKind.Relative));
        }
示例#3
0
        private void LoadDatabase()
        {
            var tmp = CSVReader.FromStream(Application.GetResourceStream(new Uri("Model/database.csv", UriKind.Relative)).Stream);

            foreach (List<string> row in tmp)
            {
                WhereFiModel r = new WhereFiModel();

                r.Latitude = Convert.ToDouble(row[1]);
                r.Longitude = Convert.ToDouble(row[0]);
                r.Name = row[2].Trim();

                database.Add(r);
            }
        }