Пример #1
0
        public Transport(
            Ped ped, Vector3 pickupPos,
            EPoliceStations dispatchFrom = EPoliceStations.Closest) :
            this(
                ped, pickupPos,

                dispatchFrom == EPoliceStations.Closest ?
                PoliceStations.GetClosestPoliceStationSpawn(pickupPos) :
                PoliceStations.GetPoliceStationSpawn(dispatchFrom))
        {
        }
Пример #2
0
        /// <summary>
        /// Method is triggerd when the user clicks on the stationButton for finding the nearest police station.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        async void onStationButton(object sender, EventArgs e)
        {
            //hier moet de functie om het dichtstbijzijnde politiebureau te vinden
            var location = await geo.GetLocationDouble();

            var policeStations = new PoliceStations();

            station = policeStations.GetNearestStation(location.Item1, location.Item2);

            label.Text = string.Format("Politiebureau: {0} \r\nAdres: {1}", station.Titel, station.BezoekAdres);
            navigateButton.IsVisible = true;
        }