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);
        }
Example #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));
        }
Example #3
0
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        ///
        /// Page specific logic should be placed in event handlers for the
        /// <see cref="GridCS.Common.NavigationHelper.LoadState"/>
        /// and <see cref="GridCS.Common.NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method
        /// in addition to page state preserved during an earlier session.

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            navigationHelper.OnNavigatedTo(e);
            uas             = (ActiveUserAndSpot)e.Parameter;
            _vm.ActivePlace = uas.Place;
            _vm.GetUserByEmail(uas.User.Email);
            _vm.LoadPlaceComments(_vm.ActivePlace.PlaceId);
            _vm.LoadPictures(_vm.ActivePlace.PlaceId);
            _vm.LoadVideos(_vm.ActivePlace.PlaceId);
            bingMap.SetView(new Location(_vm.ActivePlace.Latitude, _vm.ActivePlace.Longitude));
        }
Example #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);
     }
 }
Example #5
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));
                }
            }
        }
        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);
                    }
                }
            }
        }