コード例 #1
0
ファイル: City.cs プロジェクト: IstiVancsa/BestPathUI
 public City()
 {
     Id                 = Guid.NewGuid();
     CityName           = "";
     DestinationPoint   = false;
     MuseumType         = "";
     NeedsMuseum        = false;
     NeedsRestaurant    = false;
     RestaurantType     = "";
     StartPoint         = false;
     Location           = new LocationDTO();
     SelectedMuseum     = new GoogleTextSearchDTO();
     SelectedRestaurant = new GoogleTextSearchDTO();
     UserId             = "";
 }
コード例 #2
0
        protected async Task RestaurantSelected(GoogleTextSearchDTO restaurant)
        {
            this.Cities[Cities.Count() - 1].SelectedRestaurant = restaurant;
            this.RestaurantSearches.Clear();
            if (this.MuseumSearches.Count == 0 && this.RestaurantSearches.Count == 0)
            {
                var serializedCities = JsonConvert.SerializeObject(this.Cities);
                await LocalStorageManagerService.DeletePermanentItemAsync("Cities");

                await LocalStorageManagerService.SavePermanentItemAsync("Cities", serializedCities);
            }
            await JSRuntime.InvokeVoidAsync("hideLocation");

            ShowSuccessAlert("Restaurant selected");
            StateHasChanged();
        }
コード例 #3
0
 protected async Task HideLocation(GoogleTextSearchDTO place)
 {
     await JSRuntime.InvokeVoidAsync("hideLocation");
 }
コード例 #4
0
 protected async Task ShowLocation(GoogleTextSearchDTO place)
 {
     await JSRuntime.InvokeVoidAsync("showLocation", new LocationDTO { lat = place.geometry.location.lat, lng = place.geometry.location.lng });
 }