HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/CMS/CMSFormControls/Selectors/LargeTextAreaDesigner.aspx.cs
using System;
using System.Collections;

using CMS.ExtendedControls;
using CMS.Helpers;
using CMS.MacroEngine;
using CMS.UIControls;

/// <summary>
/// Dialog page that extends LargeTextArea form control and provides syntax highlihgting and macros support.
/// </summary>
public partial class CMSFormControls_Selectors_LargeTextAreaDesigner : MessagePage
{
    protected Hashtable mParameters;

    /// <summary>
    /// Hashtable containing dialog parameters.
    /// </summary>
    protected Hashtable Parameters
    {
        get
        {
            if (mParameters == null)
            {
                string identifier = QueryHelper.GetString("params", null);
                mParameters = (Hashtable)WindowHelper.GetItem(identifier);
            }
            return mParameters;
        }
    }


    /// <summary>
    /// ID of base editor control
    /// </summary>
    protected string EditorId
    {
        get
        {
            if (Parameters != null)
            {
                return ValidationHelper.GetString(Parameters["editorid"], string.Empty);
            }
            return string.Empty;
        }
    }
    
    #region "Methods"

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!QueryHelper.ValidateHash("hash") || Parameters == null)
        {
            return;
        }

        txtText.Editor.Language = LanguageEnum.HTMLMixed;
        txtText.Editor.FullScreenParentElementID = "divContent";

        // Set window title and image
        PageTitle.TitleText = GetString("EditingFormControl.TitleText");
        // Set macro options using the querystring argument
        bool allowMacros = ValidationHelper.GetBoolean(Parameters["allowmacros"], true);
        txtText.Editor.ShowInsertMacro = allowMacros;
        if (allowMacros)
        {
            string resolverName = ValidationHelper.GetString(Parameters["resolvername"], string.Empty);
            MacroResolver resolver = MacroResolverStorage.GetRegisteredResolver(resolverName);
            txtText.Resolver = resolver;
        }

        // Register macro scripts
        RegisterModalPageScripts();
        RegisterEscScript();
    }


    /// <summary>
    /// Disables handler base tag to fix App_Theme issues.
    /// </summary>
    protected override void OnInit(EventArgs e)
    {
        UseBaseTagForHandlerPage = false;
        base.OnInit(e);
    }

    #endregion
}