/// <summary>
    /// Page LoadComplete event handler.
    /// </summary>
    protected void Page_LoadComplete(object sender, EventArgs e)
    {
        if (Editor != null)
        {
            // Setup the editor syntax highlighting language
            Editor.Language = LanguageCode.GetLanguageEnumFromString("css");
        }

        BaseEditMenu editMenu = ControlsHelper.GetParentControl(Control.ObjectManager.HeaderActions, typeof(BaseEditMenu)) as BaseEditMenu;

        if (editMenu != null)
        {
            editMenu.OnGetClientActionScript += editMenu_OnGetClientActionScript;
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string url    = QueryHelper.GetString("url", null);
        string format = QueryHelper.GetString("format", null);

        txtCodeText.HighlightMacros = false;

        InitializeScripts(url);

        if (!String.IsNullOrEmpty(format))
        {
            txtCodeText.Language = LanguageCode.GetLanguageEnumFromString(format);
            SetTitle("Design/Controls/Validation/codeview.png", GetString("validation.css.viewcodetooltip"), null, null);
        }
    }
Esempio n. 3
0
    /// <summary>
    /// Page LoadComplete event handler.
    /// </summary>
    protected void Page_LoadComplete(object sender, EventArgs e)
    {
        HandleCssCodePreview();

        // Setup the editor syntax highlighting according to the selected language
        string lang        = EditForm.GetDataValue("StylesheetDynamicLanguage") as string;
        string previewMode = EditForm.GetFieldValue("StylesheetCodePreview") as string;

        if (String.IsNullOrEmpty(lang) || lang.EqualsCSafe(CssStylesheetInfo.PLAIN_CSS, true) || (!String.IsNullOrEmpty(previewMode) && previewMode.EqualsCSafe("preview", true)))
        {
            Editor.Language = LanguageCode.GetLanguageEnumFromString("css");
        }
        else
        {
            LanguageEnum langEnum = LanguageCode.GetLanguageEnumFromString(lang);
            Editor.Language = (langEnum != default(LanguageEnum)) ? langEnum : LanguageEnum.CSS;
        }
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string url    = HttpUtility.UrlDecode(QueryHelper.GetString("url", null));
        string format = QueryHelper.GetString("format", null);

        string message = HttpUtility.UrlDecode(QueryHelper.GetString("message", null));

        if (!String.IsNullOrEmpty(message))
        {
            ShowError(message);
        }

        txtCodeText.HighlightMacros = false;
        txtCodeText.AllowFullscreen = false;

        if (!String.IsNullOrEmpty(format))
        {
            txtCodeText.Language = LanguageCode.GetLanguageEnumFromString(format);
            SetTitle(GetString("validation.css.viewcodetooltip"));
        }

        InitializeScripts(url);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string url    = HttpUtility.UrlDecode(QueryHelper.GetString("url", null));
        string format = QueryHelper.GetString("format", null);

        string message = HttpUtility.UrlDecode(QueryHelper.GetString("message", null));

        if (!String.IsNullOrEmpty(message))
        {
            lblError.Text    = message;
            lblError.Visible = true;
        }

        txtCodeText.HighlightMacros = false;
        txtCodeText.AllowFullscreen = false;

        if (!String.IsNullOrEmpty(format))
        {
            txtCodeText.Language = LanguageCode.GetLanguageEnumFromString(format);
            SetTitle("Design/Controls/Validation/codeviewtitle.png", GetString("validation.css.viewcodetooltip"), null, null);
        }

        InitializeScripts(url);
    }