Carrotware.CMS.UI.Controls.ContentPageImageThumb.SetFileInfo C# (CSharp) Метод

SetFileInfo() приватный Метод

private SetFileInfo ( ContentPage cp ) : void
cp Carrotware.CMS.Core.ContentPage
Результат void
        private void SetFileInfo(ContentPage cp)
        {
            string sFieldValue = cp.Thumbnail;

            if (String.IsNullOrEmpty(sFieldValue)) {
                // if page itself has no image, see if the image had been specified directly
                sFieldValue = this.ImageUrl;
            }
            if (String.IsNullOrEmpty(sFieldValue)) {
                this.Visible = false;
            }
            if (!String.IsNullOrEmpty(sFieldValue) && !sFieldValue.StartsWith("/")) {
                sFieldValue = cp.TemplateFolderPath + sFieldValue;
            }

            if (PerformURLResize && !String.IsNullOrEmpty(sFieldValue)) {
                sFieldValue = String.Format("/carrotwarethumb.axd?scale={0}&thumb={1}&square={2}", ScaleImage, HttpUtility.UrlEncode(sFieldValue), ThumbSize);
            }

            this.ImageUrl = sFieldValue;
        }
ContentPageImageThumb