public async void SponsorDetials(SponsorGroup _sponsor, SponsorsTemplate parentSponsor) { await((HomeLayout)App.Current.MainPage).SetLoading(true, "loading sponsor..."); currentSponsor = _sponsor; sponsorTemp = parentSponsor; VcardContact c_user = new VcardContact(); c_user.FirstName = currentSponsor.company.CompanyName; c_user.LastName = currentSponsor.company.CompanyName; c_user.company = currentSponsor.company.CompanyName; c_user.phoneNumber = currentSponsor.company.companyPhone; c_user.email = currentSponsor.company.companyEmail; App.contactuser = c_user; if (currentSponsor.company != null) { CheckSocialVisiblilty(); if (!string.IsNullOrEmpty(currentSponsor.company.companyLogo)) { sponsorLogo.Source = currentSponsor.company.companyLogo; Regex initials = new Regex(@"(\b[a-zA-Z])[a-zA-Z]* ?"); string init = initials.Replace(currentSponsor.company.CompanyName, "$1"); if (init.Length > 3) { init = init.Substring(0, 3); } logoText.Text = init.ToUpper(); } else { sponsorLogo.Source = ""; Regex initials = new Regex(@"(\b[a-zA-Z])[a-zA-Z]* ?"); string init = initials.Replace(currentSponsor.company.CompanyName, "$1"); if (init.Length > 3) { init = init.Substring(0, 3); } logoText.Text = init.ToUpper(); } if (!string.IsNullOrEmpty(currentSponsor.company.CompanyName)) { sponsorName.Text = currentSponsor.company.CompanyName; } else { sponsorName.Text = ""; } if (currentSponsor.sponsor.sponsorFields.Count > 0) { BaseFunctions.GetCustomFields(customFieldsLayout, currentSponsor.sponsor.sponsorFields); } if (!string.IsNullOrEmpty(currentSponsor.company.companyWebsite)) { websiteURL = currentSponsor.company.companyWebsite; } id = _sponsor.sponsor.sponsorID; if (!string.IsNullOrEmpty(currentSponsor.company.companyDescription)) { description.Text = currentSponsor.company.companyDescription; emptyList.IsVisible = false; } else { emptyList.IsVisible = true; description.ParentView.IsVisible = false; } } CheckBookmark(App.serverData.mei_user.currentUser.userBookmarks.isBookmarked(currentSponsor)); await Task.Delay(1000); await((HomeLayout)App.Current.MainPage).SetLoading(false, ""); }