Exemplo n.º 1
0
 private void OnPlaceSelected(object sender, EventArgs e)
 {
     if (sender is PlaceMarker marker)
     {
         SelectedPlace = marker;
     }
 }
Exemplo n.º 2
0
        private PlaceMarker CreatePlaceMarker(Place place)
        {
            var marker = new PlaceMarker(place);

            marker.Selected += OnPlaceSelected;
            placesCollection.Add(marker);

            return(marker);
        }
Exemplo n.º 3
0
 public void DeletePlace()
 {
     if (SelectedPlace != null)
     {
         placesCollection.Remove(SelectedPlace);
         placeRepository.Delete(SelectedPlace.Place);
         SelectedPlace = null;
     }
 }
Exemplo n.º 4
0
        public Task NewPlace(Place place)
        {
            SelectedPlace = CreatePlaceMarker(place);

            return(placeRepository.Create(place));
        }