public moreInfos() {
     this.InitializeComponent();
     var currentView = SystemNavigationManager.GetForCurrentView();
     currentView.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
     currentView.BackRequested += BackRequested;
     parking2 = null;
     bicikelj = null;
 }
 private void displayPOIbicikelj(StationInfo bicikelj) {
     BasicGeoposition snPosition = new BasicGeoposition() { Latitude = double.Parse(bicikelj.lat), Longitude = double.Parse(bicikelj.lng) };
     Geopoint snPoint = new Geopoint(snPosition);
     MapIcon mapIcon = new MapIcon();
     mapIcon.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/bikegreen.png"));
     mapIcon.Location = snPoint;
     mapIcon.NormalizedAnchorPoint = new Point(0.5, 1.0);
     mapIcon.Title = bicikelj.name;
     mapIcon.ZIndex = 0;
     myMap.MapElements.Add(mapIcon);
 }
        protected override void OnNavigatedTo(NavigationEventArgs e) {
            if(typeof(Parkirisca) == e.Parameter.GetType()) {
                parking2 = (Parkirisca)e.Parameter;
                var nameP  = (parking2.Ime != null) ? parking2.Ime : "No Name";
                int totalP = 0;
                int disabP = 0;
                int takenP = 0;
                if(parking2.St_mest != null) {
                    totalP = parking2.St_mest;
                }
                if(parking2.Invalidi_St_mest != null) {
                    disabP = (int)parking2.Invalidi_St_mest;
                }
                if(parking2.zasedenost != null) {
                    if (parking2.zasedenost.P_kratkotrajniki != null) {
                        takenP = (int)parking2.zasedenost.P_kratkotrajniki;
                    }
                }
                var freeP = totalP - disabP - takenP;

                name.Text = "Name: " + nameP;
                total.Text = "Total: " + totalP + " For Disabled People: " + disabP;
                taken.Text = "Taken: " + takenP;
                free.Text = "Free " + freeP;
                description.Text = (parking2.Opis != null) ? "Description:\n" + parking2.Opis : "No description available.";
                
                if(freeP <= 0) {
                    reserve.Visibility = Visibility.Collapsed;
                }
            }
            else if (typeof(StationInfo) == e.Parameter.GetType()) {
                bicikelj = (StationInfo)e.Parameter;
                var addrB = (bicikelj.fullAddress != null) ? bicikelj.fullAddress : "No Address";
                int totalB = 0;
                int availB = 0;
                int freeB = 0;
                if( bicikelj.station != null) {
                    totalB = (bicikelj.station.total != null) ? Int32.Parse(bicikelj.station.total) : 0;
                    availB = (bicikelj.station.available != null) ? Int32.Parse(bicikelj.station.available) : 0;
                    freeB = (bicikelj.station.free != null) ? Int32.Parse(bicikelj.station.free) : 0;
                }

                address.Text = "Address: " + addrB;
                total.Text = "Total: " + totalB;
                taken.Text = "Availible Bikes: " + availB;
                free.Text = "Free Spots: " + freeB;
            
                if (availB <= 0) {
                    reserve.Visibility = Visibility.Collapsed;
                }
            }
        }
 protected override void OnNavigatedTo(NavigationEventArgs e) {
     if (typeof(ObservableCollection<StationInfo>) == e.Parameter.GetType()) {
         bicikeLJpostaje = (ObservableCollection<StationInfo>)e.Parameter;
         foreach (var enaPostaja in bicikeLJpostaje) {
             displayPOIbicikelj(enaPostaja);
         }
     } else if (typeof(StationInfo) == e.Parameter.GetType()) {
         enaPostaja = (StationInfo)e.Parameter;
         displayPOIbicikelj(enaPostaja);
     } else if (typeof(ObservableCollection<Parkirisca>) == e.Parameter.GetType()) {
         parkiriscaLJ = (ObservableCollection<Parkirisca>)e.Parameter;
         foreach (var enoParkirisce in parkiriscaLJ) {
             displayPOIparking(enoParkirisce);
         }
     } else if (typeof(Parkirisca) == e.Parameter.GetType()) {
         enoParkirisce = (Parkirisca)e.Parameter;
         displayPOIparking(enoParkirisce);
     }
 }
 public void Add(StationInfo station) {
     this.stations.Add(station);
 }