using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using AjaxControlToolkit; using CMS.GlobalHelper; using CMS.PortalControls; using CMS.PortalEngine; using CMS.SettingsProvider; public partial class CMSWebParts_Wireframe_Layouts_Area : CMSAbstractLayoutWebPart { #region "Variables" private CMSWebPartZone zone = null; #endregion #region "Properties" /// /// Width. /// public string Width { get { return ValidationHelper.GetString(GetValue("Width"), ""); } set { SetValue("Width", value); } } /// /// Height. /// public string Height { get { return ValidationHelper.GetString(GetValue("Height"), ""); } set { SetValue("Height", value); } } #endregion #region "Methods" /// /// Constructor /// public CMSWebParts_Wireframe_Layouts_Area() { SimpleRender = true; } /// /// Prepares the layout of the web part. /// protected override void PrepareLayout() { StartLayout(true); // Add the zone zone = AddZone(ID + "_zone", ID, pnlZone); zone.LayoutType = ZoneLayoutTypeEnum.Free; zone.CssClass += " WireframeArea"; zone.ZoneWidth = Width; zone.ZoneHeight = Height; FinishLayout(false); } /// /// Content loaded event handler /// public override void OnContentLoaded() { base.OnContentLoaded(); SetupControl(); } /// /// Initializes the control properties /// protected void SetupControl() { if (this.StopProcessing) { // Do not process } else { if (this.IsDesign) { pnlZone.CssClass = "WebPartZoneContent"; if (ViewMode != ViewModeEnum.DesignDisabled) { pnlActions.Visible = true; } } resElem.ResizedElementID = zone.ContainerClientID; } } #endregion }