public SearchSpaceDetailViewModel(PublicSpace publicspace, Page currentPage)
        {
            PublicSpace = publicspace;
            this.Title  = publicspace.Title;

            _CurrentPage      = currentPage;
            _GeoCodingService = DependencyService.Get <IGeoCodingService>();
        }
 async Task PushTabbedPage(PublicSpace publicspace = null)
 {
     if (Device.OS == TargetPlatform.iOS)
     {
         var searchSpaceDetailPage = new SearchSpaceDetailPage()
         {
             BindingContext = new SearchSpaceDetailViewModel(publicspace, this)
             {
                 Navigation = this.Navigation
             },
         };
         await Navigation.PushAsync(searchSpaceDetailPage);
     }
 }
        async void OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            PublicSpace publicspace = (PublicSpace)e.Item;

            await PushTabbedPage(publicspace);
        }
Example #4
0
    public string buildingFlavorText(string building)
    {
        if (building == "House")
        {
            House x = new House();
            return x.flavorText;
        }

        else if (building == "Farm")
        {
            Farm x = new Farm();
            return x.flavorText;
        }

        else if (building == "Factory")
        {
            Factory x = new Factory();
            return x.flavorText;
        }

        else if (building == "Executive Building")
        {
            ExecutiveBuilding x = new ExecutiveBuilding();
            return x.flavorText;
        }

        else if (building == "Educational Building")
        {
            EducationalBuilding x = new EducationalBuilding();
            return x.flavorText;
        }

        else if (building == "Hospital")
        {
            Hospital x = new Hospital();
            return x.flavorText;
        }

        else if (building == "Laboratory")
        {
            Laboratory x = new Laboratory();
            return x.flavorText;
        }

        else if (building == "Police Station")
        {
            PoliceStation x = new PoliceStation();
            return x.flavorText;
        }

        else if (building == "Workplace")
        {
            Workplace x = new Workplace();
            return x.flavorText;
        }

        else if (building == "Public Space")
        {
            PublicSpace x = new PublicSpace();
            return x.flavorText;
        }

        else if (building == "World Trade Center")
        {
            WTC x = new WTC();
            return x.flavorText;
        }

        else if (building == "Military Outpost")
        {
            MilitaryOutpost x = new MilitaryOutpost();
            return x.flavorText;
        }

        else if (building == "Food Territory")
        {
            FoodTerritory x = new FoodTerritory();
            return x.flavorText;
        }

        else if (building == "Materials Territory")
        {
            MaterialsTerritory x = new MaterialsTerritory();
            return x.flavorText;
        }

        else if (building == "Citizens Territory")
        {
            CitizensTerritory x = new CitizensTerritory();
            return x.flavorText;
        }

        else
            return "";
    }