Esempio n. 1
0
        private static string GetLoadImg(Page Page, PreviewImageLoadingAnimation LoadingAnimation)
        {
            string loadingimg = "null";

            switch (LoadingAnimation)
            {
            case PreviewImageLoadingAnimation.None:
                loadingimg = "false";
                break;

            case PreviewImageLoadingAnimation.Gray:
                loadingimg = "\'" + Page.ClientScript.GetWebResourceUrl(typeof(PreviewImage), Configuration.Resources.PreviewGrayGif) + "\'";
                break;

            case PreviewImageLoadingAnimation.BlackOnWhite:
                loadingimg = "\'" + Page.ClientScript.GetWebResourceUrl(typeof(PreviewImage), Configuration.Resources.PreviewBlackWhiteGif) + "\'";
                break;

            case PreviewImageLoadingAnimation.WhiteOnBlack:
                loadingimg = "\'" + Page.ClientScript.GetWebResourceUrl(typeof(PreviewImage), Configuration.Resources.PreviewWhiteBlackGif) + "\'";
                break;
            }
            return(loadingimg);
        }
Esempio n. 2
0
 /// <summary>
 /// Gets the statement (without javascript:) that can startup this control.
 /// </summary>
 public static string GetOnClickClientScript(Page page, string imageUrl, PreviewImageLoadingAnimation loadingAnimation, string description, int transparencyLevel, System.Drawing.Color transparencyColor)
 {
     return(GetOnClickClientScript(page, imageUrl, loadingAnimation, description, transparencyLevel, transparencyColor, false));
 }
Esempio n. 3
0
 /// <summary>
 /// Gets the statement (without javascript:) that can startup this control.
 /// </summary>
 public static string GetOnClickClientScript(Page page, string imageUrl, PreviewImageLoadingAnimation loadingAnimation, string description, int transparencyLevel, System.Drawing.Color transparencyColor, bool hideObjects)
 {
     RegisterIncludes(page);
     return("PreviewImage_Open(null, \'" + page.ResolveClientUrl(imageUrl) + "\', " + GetDesc(description) + ", " + GetLoadImg(page, loadingAnimation) + ", " + GetClose(page) + ", " + (100 - transparencyLevel) + ", \'" + ColorTranslator.ToHtml(transparencyColor) + "\', " + hideObjects.ToString().ToLower() + ");");
 }