public ServiceCell(Service service, bool isCategory) { this.service = service; if (isCategory) Title = service.category; else Title = service.name; Color = Theme.getTextColor(); }
public Service_Results_Screen(Service service) { InitializeComponent(); setTheme(); NavigationPage.SetBackButtonTitle(this, "Back"); serviceObject = service; //Title = service.name; name.Text = service.name; description.Text = service.description; phoneNumber.Text = service.phoneNumber; website.Text = service.website; if (phoneNumber.Text.Length == 0) { phoneNumber.Text = "N/A"; } else { //Make the phoneNumber label clickable var phoneNumber_tap = new TapGestureRecognizer(); phoneNumber_tap.Tapped += (sender, eventArgs) => { pressOnServicePhoneNumber(); }; phoneNumber.GestureRecognizers.Add(phoneNumber_tap); } if (website.Text.Length == 0) { website.Text = "N/A"; } else { //Make the website label clickable var website_tap = new TapGestureRecognizer(); website_tap.Tapped += (sender, eventArgs) => { pressOnServiceWebsiteURL(); }; website.GestureRecognizers.Add(website_tap); } if (service.isFavorite) buttons.Children.Remove(favoritesButton); if (service.coordinatesLatitude <= -999.0 && service.coordinatesLongitude <= -999.0) buttons.Children.Remove(takeMeThereButton); }
public ServiceCell(Service service) : this(service, false) { }