예제 #1
0
        private void OnPushTapped(object sender, RoutedEventArgs e)
        {
            LocationIcon10m locationPin = sender as LocationIcon10m;
            if (locationPin != null)
            {
                var x = MapLayer.GetPosition(locationPin);
                double lat = x.Latitude;
               // _vm.GetSpotByLatitude(lat);
                foreach (Place p in _vm.Places)
                {
                    if (p.Latitude == x.Latitude || p.Longitude == x.Longitude)
                    {
                        //txtTappedPlace.Text = p.PlaceId.ToString();
                        ActiveUserAndSpot uas = new ActiveUserAndSpot();
                        uas.Place = p;
                        uas.User = _vm.ActiveUser;
                        Frame.Navigate(typeof(DetailSpotPage), uas);

                    }
                }
            }
        }
예제 #2
0
 private void topspotMap_Tap_1(object sender, System.Windows.Input.GestureEventArgs e)
 {
     ActiveUserAndSpot uas = new ActiveUserAndSpot();
     uas.Place = _vm.Places[1];
     uas.User = _vm.ActiveUser;
     u.Email = "*****@*****.**";
     NavigationService.Navigate(new Uri("/DetailSpotPage.xaml?user="******"&spotId=" + uas.Place.PlaceId, UriKind.Relative));        
 }
예제 #3
0
        private void OnPushTapped(object sender, EventArgs e)
        {
              Image img = sender as Image;
              Place tappedPlace = (Place)img.Tag;

              foreach (Place p in _vm.Places)
              {
                  if (p.Latitude == tappedPlace.Latitude || p.Longitude == tappedPlace.Longitude)
                  {
                      //txtTappedPlace.Text = p.PlaceId.ToString();
                      ActiveUserAndSpot uas = new ActiveUserAndSpot();
                      uas.Place = p;
                      uas.User = _vm.ActiveUser;

                      //user.Email = "*****@*****.**";

                      NavigationService.Navigate(new Uri("/DetailSpotPage.xaml?user="******"&spotId=" + uas.Place.PlaceId, UriKind.Relative));            
                  }
              }
        }
예제 #4
0
        private void Spot3_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (_vm.ActiveUser == null)
            {

            }
            else
            {
                ActiveUserAndSpot uas = new ActiveUserAndSpot();
                uas.Place = _vm.Places[2];
                uas.User = _vm.ActiveUser;
                Frame.Navigate(typeof(DetailSpotPage), uas);
            }
        }
예제 #5
0
 private void grvSpots_ItemClick(object sender, ItemClickEventArgs e)
 {
     ActiveUserAndSpot uas = new ActiveUserAndSpot();
     uas.Place = (Place)e.ClickedItem;
     uas.User = _vm.ActiveUser;
     Frame.Navigate(typeof(DetailSpotPage), uas);
 }