示例#1
0
        /// <summary>
        /// Retrieves the property values from a <see cref="T:System.Web.UI.WebControls.WebParts.WebPart"/> control for its associated <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart"/> control.
        /// </summary>
        public override void SyncChanges()
        {
            SiteQuotaWebPart quotaWebPart = WebPartToEdit as SiteQuotaWebPart;

            if (quotaWebPart == null)
            {
                return;
            }
            EnsureChildControls();
            _xslText.Text = quotaWebPart.XslText;
        }
示例#2
0
        /// <summary>
        /// Saves the values in an <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart"/> control to the corresponding properties in the associated <see cref="T:System.Web.UI.WebControls.WebParts.WebPart"/> control.
        /// </summary>
        /// <returns>
        /// true if the action of saving values from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart"/> control to the <see cref="T:System.Web.UI.WebControls.WebParts.WebPart"/> control is successful; otherwise (if an error occurs), false.
        /// </returns>
        public override bool ApplyChanges()
        {
            SiteQuotaWebPart quotaWebPart = WebPartToEdit as SiteQuotaWebPart;

            if (quotaWebPart != null)
            {
                EnsureChildControls();
                quotaWebPart.XslText = _xslText.Text;
            }

            return(quotaWebPart != null);
        }