public override void ThemeChanged() { if (Theme != null) { if (HeaderView != null) { var headerLabel = HeaderView.Subviews[0] as UILabel; headerLabel.Text = Caption; if (Theme.HeaderTextFont != null) { headerLabel.Font = Theme.HeaderTextFont; } if (Theme.HeaderTextColor != null) { headerLabel.TextColor = Theme.HeaderTextColor; } if (Theme.HeaderTextShadowColor != null) { headerLabel.ShadowColor = Theme.HeaderTextShadowColor; } if (Theme.HeaderTextShadowOffset != SizeF.Empty) { headerLabel.ShadowOffset = Theme.HeaderTextShadowOffset; } } if (FooterView != null) { var footerLabel = FooterView as UILabel; footerLabel.Text = FooterText.Replace("\n", ""); if (Theme.FooterTextFont != null) { footerLabel.Font = DetailTextFont; } if (Theme.FooterTextColor != null) { footerLabel.TextColor = Theme.FooterTextColor; } if (Theme.FooterTextShadowColor != null) { footerLabel.ShadowColor = Theme.FooterTextShadowColor; } if (Theme.FooterTextShadowOffset != SizeF.Empty) { footerLabel.ShadowOffset = Theme.FooterTextShadowOffset; } } } }
public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { var outputFormat = string.Empty; if (format == string.Empty) { outputFormat = "g"; } var lowerPropertyName = propertyName.ToLowerInvariant(); if (accessLevel == Scope.NoSettings) { propertyNotFound = true; return(PropertyAccess.ContentLocked); } propertyNotFound = true; var result = string.Empty; var isPublic = true; switch (lowerPropertyName) { case "url": propertyNotFound = false; result = PropertyAccess.FormatString(PortalAlias.HTTPAlias, format); break; case "fullurl": //return portal alias with protocol propertyNotFound = false; result = PropertyAccess.FormatString(Globals.AddHTTP(PortalAlias.HTTPAlias), format); break; case "passwordreminderurl": //if regsiter page defined in portal settings, then get that page url, otherwise return home page. propertyNotFound = false; var reminderUrl = Globals.AddHTTP(PortalAlias.HTTPAlias); if (RegisterTabId > Null.NullInteger) { reminderUrl = Globals.RegisterURL(string.Empty, string.Empty); } result = PropertyAccess.FormatString(reminderUrl, format); break; case "portalid": propertyNotFound = false; result = (PortalId.ToString(outputFormat, formatProvider)); break; case "portalname": propertyNotFound = false; result = PropertyAccess.FormatString(PortalName, format); break; case "homedirectory": propertyNotFound = false; result = PropertyAccess.FormatString(HomeDirectory, format); break; case "homedirectorymappath": isPublic = false; propertyNotFound = false; result = PropertyAccess.FormatString(HomeDirectoryMapPath, format); break; case "logofile": propertyNotFound = false; result = PropertyAccess.FormatString(LogoFile, format); break; case "footertext": propertyNotFound = false; var footerText = FooterText.Replace("[year]", DateTime.Now.Year.ToString()); result = PropertyAccess.FormatString(footerText, format); break; case "expirydate": isPublic = false; propertyNotFound = false; result = (ExpiryDate.ToString(outputFormat, formatProvider)); break; case "userregistration": isPublic = false; propertyNotFound = false; result = (UserRegistration.ToString(outputFormat, formatProvider)); break; case "banneradvertising": isPublic = false; propertyNotFound = false; result = (BannerAdvertising.ToString(outputFormat, formatProvider)); break; case "currency": propertyNotFound = false; result = PropertyAccess.FormatString(Currency, format); break; case "administratorid": isPublic = false; propertyNotFound = false; result = (AdministratorId.ToString(outputFormat, formatProvider)); break; case "email": propertyNotFound = false; result = PropertyAccess.FormatString(Email, format); break; case "hostfee": isPublic = false; propertyNotFound = false; result = (HostFee.ToString(outputFormat, formatProvider)); break; case "hostspace": isPublic = false; propertyNotFound = false; result = (HostSpace.ToString(outputFormat, formatProvider)); break; case "pagequota": isPublic = false; propertyNotFound = false; result = (PageQuota.ToString(outputFormat, formatProvider)); break; case "userquota": isPublic = false; propertyNotFound = false; result = (UserQuota.ToString(outputFormat, formatProvider)); break; case "administratorroleid": isPublic = false; propertyNotFound = false; result = (AdministratorRoleId.ToString(outputFormat, formatProvider)); break; case "administratorrolename": isPublic = false; propertyNotFound = false; result = PropertyAccess.FormatString(AdministratorRoleName, format); break; case "registeredroleid": isPublic = false; propertyNotFound = false; result = (RegisteredRoleId.ToString(outputFormat, formatProvider)); break; case "registeredrolename": isPublic = false; propertyNotFound = false; result = PropertyAccess.FormatString(RegisteredRoleName, format); break; case "description": propertyNotFound = false; result = PropertyAccess.FormatString(Description, format); break; case "keywords": propertyNotFound = false; result = PropertyAccess.FormatString(KeyWords, format); break; case "backgroundfile": propertyNotFound = false; result = PropertyAccess.FormatString(BackgroundFile, format); break; case "admintabid": isPublic = false; propertyNotFound = false; result = AdminTabId.ToString(outputFormat, formatProvider); break; case "supertabid": isPublic = false; propertyNotFound = false; result = SuperTabId.ToString(outputFormat, formatProvider); break; case "splashtabid": isPublic = false; propertyNotFound = false; result = SplashTabId.ToString(outputFormat, formatProvider); break; case "hometabid": isPublic = false; propertyNotFound = false; result = HomeTabId.ToString(outputFormat, formatProvider); break; case "logintabid": isPublic = false; propertyNotFound = false; result = LoginTabId.ToString(outputFormat, formatProvider); break; case "registertabid": isPublic = false; propertyNotFound = false; result = RegisterTabId.ToString(outputFormat, formatProvider); break; case "usertabid": isPublic = false; propertyNotFound = false; result = UserTabId.ToString(outputFormat, formatProvider); break; case "defaultlanguage": propertyNotFound = false; result = PropertyAccess.FormatString(DefaultLanguage, format); break; case "users": isPublic = false; propertyNotFound = false; result = Users.ToString(outputFormat, formatProvider); break; case "pages": isPublic = false; propertyNotFound = false; result = Pages.ToString(outputFormat, formatProvider); break; case "contentvisible": isPublic = false; break; case "controlpanelvisible": isPublic = false; propertyNotFound = false; result = PropertyAccess.Boolean2LocalizedYesNo(ControlPanelVisible, formatProvider); break; } if (!isPublic && accessLevel != Scope.Debug) { propertyNotFound = true; result = PropertyAccess.ContentLocked; } return(result); }