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/wwwroot/CMSWebParts/Wireframe/Components/Dialog.ascx.cs
using System;
using System.Data;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using CMS.ExtendedControls;
using CMS.Helpers;
using CMS.PortalControls;

public partial class CMSWebParts_Wireframe_Components_Dialog : CMSAbstractWireframeWebPart
{
    #region "Properties"

    /// <summary>
    /// Title
    /// </summary>
    public string Title
    {
        get
        {
            return ValidationHelper.GetString(this.GetValue("Title"), "Enter title");
        }
        set
        {
            this.SetValue("Title", value);
        }
    }


    /// <summary>
    /// Text
    /// </summary>
    public string Text
    {
        get
        {
            return ValidationHelper.GetString(this.GetValue("Text"), "Enter dialog text");
        }
        set
        {
            this.SetValue("Text", value);
        }
    }


    /// <summary>
    /// Buttons
    /// </summary>
    public string Buttons
    {
        get
        {
            return ValidationHelper.GetString(this.GetValue("Buttons"), "Yes\nNo");
        }
        set
        {
            this.SetValue("Buttons", value);
        }
    }

    #endregion


    #region "Methods"

    /// <summary>
    /// Content loaded event handler.
    /// </summary>
    public override void OnContentLoaded()
    {
        base.OnContentLoaded();
        SetupControl();
    }


    /// <summary>
    /// Initializes the control properties.
    /// </summary>
    protected void SetupControl()
    {
        if (StopProcessing)
        {
            // Do not process
        }
        else
        {
            ltlText.Text = Text;
            ltlTitle.Text = Title;
            ltlButtons.Text = Buttons;

            ltlButtons.ItemFormat = "<li class=\"WireframeButton\">{0}</li>";

            // Height
            string h = WebPartHeight;
            if (!String.IsNullOrEmpty(h))
            {
                pnlDialog.Height = new Unit(h);
            }

            // Width
            string w = WebPartWidth;
            if (!String.IsNullOrEmpty(w))
            {
                pnlDialog.Width = new Unit(w);
            }

            resElem.ResizedElementID = pnlDialog.ClientID;
        }
    }


    /// <summary>
    /// Reloads the control data.
    /// </summary>
    public override void ReloadData()
    {
        base.ReloadData();

        SetupControl();
    }

    #endregion
}