Exemplo n.º 1
0
        private void AddGalleryTitle()
        {
            GalleryServerPro.Configuration.Core core = this.GalleryPage.Core;

            if (String.IsNullOrEmpty(core.PageHeaderText))
            {
                return;
            }

            HtmlGenericControl pTag = new HtmlGenericControl("p");

            pTag.Attributes["class"] = "gsp_bannertext";

            if (!String.IsNullOrEmpty(core.PageHeaderText) && (core.PageHeaderTextUrl.Trim().Length > 0))
            {
                HyperLink hlHeader = new HyperLink();
                hlHeader.Text = core.PageHeaderText;

                string headerTextUrl = core.PageHeaderTextUrl.Trim();

                switch (headerTextUrl)
                {
                case "/":
                {
                    // Create a link to the root of the web site.
                    hlHeader.NavigateUrl = headerTextUrl;
                    hlHeader.ToolTip     = Resources.GalleryServerPro.Header_PageHeaderTextUrlToolTipWebRoot;
                    break;
                }

                case "~/":
                {
                    // Create a link to the top level album.
                    hlHeader.NavigateUrl = Util.GetCurrentPageUrl();
                    hlHeader.ToolTip     = Resources.GalleryServerPro.Header_PageHeaderTextUrlToolTipAppRoot;
                    break;
                }

                default:
                {
                    // Create a link to the specified URL.
                    hlHeader.NavigateUrl = headerTextUrl;
                    hlHeader.ToolTip     = String.Format(CultureInfo.CurrentCulture, Resources.GalleryServerPro.Header_PageHeaderTextUrlToolTip, headerTextUrl);
                    break;
                }
                }

                pTag.Controls.Add(hlHeader);
            }
            else
            {
                pTag.InnerText = core.PageHeaderText;
            }

            pnlHeader.Controls.Add(pTag);
        }
Exemplo n.º 2
0
        private static Watermark GetReducedFunctionalityModeWatermark()
        {
            GalleryServerPro.Configuration.Core coreConfig = GalleryServerPro.Configuration.ConfigManager.GetGalleryServerProConfigSection().Core;

            Watermark tempWatermark = new Watermark();

            tempWatermark.WatermarkText       = GalleryServerPro.Business.Properties.Resources.Reduced_Functionality_Mode_Watermark_Text;
            tempWatermark.TextFontName        = coreConfig.WatermarkTextFontName;
            tempWatermark.TextColor           = HelperFunctions.GetColor(coreConfig.WatermarkTextColor);
            tempWatermark.TextHeightPixels    = 0;
            tempWatermark.TextWidthPercent    = 100;
            tempWatermark.TextOpacityPercent  = 100;
            tempWatermark.TextLocation        = ContentAlignment.MiddleCenter;
            tempWatermark._watermarkImage     = GalleryServerPro.Business.Properties.Resources.GSP_Logo;
            tempWatermark.ImageWidthPercent   = 40;
            tempWatermark.ImageOpacityPercent = 80;
            tempWatermark.ImageLocation       = ContentAlignment.BottomCenter;

            return(tempWatermark);
        }
Exemplo n.º 3
0
        private static Watermark GetUserSpecifiedWatermark()
        {
            GalleryServerPro.Configuration.Core coreConfig = GalleryServerPro.Configuration.ConfigManager.GetGalleryServerProConfigSection().Core;

            Watermark tempWatermark = new Watermark();

            tempWatermark.WatermarkText       = coreConfig.WatermarkText;
            tempWatermark.TextFontName        = coreConfig.WatermarkTextFontName;
            tempWatermark.TextColor           = HelperFunctions.GetColor(coreConfig.WatermarkTextColor);
            tempWatermark.TextHeightPixels    = coreConfig.WatermarkTextFontSize;
            tempWatermark.TextWidthPercent    = coreConfig.WatermarkTextWidthPercent;
            tempWatermark.TextOpacityPercent  = coreConfig.WatermarkTextOpacityPercent;
            tempWatermark.TextLocation        = (ContentAlignment)Enum.Parse(typeof(ContentAlignment), coreConfig.WatermarkTextLocation);
            tempWatermark.ImagePath           = coreConfig.WatermarkImagePath;
            tempWatermark.ImageWidthPercent   = coreConfig.WatermarkImageWidthPercent;
            tempWatermark.ImageOpacityPercent = coreConfig.WatermarkImageOpacityPercent;
            tempWatermark.ImageLocation       = (ContentAlignment)Enum.Parse(typeof(ContentAlignment), coreConfig.WatermarkImageLocation);

            return(tempWatermark);
        }