using System; using System.Data; using System.Web; using System.Web.UI; using CMS.Forums; using CMS.GlobalHelper; using CMS.PortalControls; public partial class CMSWebParts_Forums_ForumUnsubscription : CMSAbstractWebPart { #region "Public properties" /// /// Unsubscription info text /// public string UnsubscriptionInfoText { get { return ValidationHelper.GetString(this.GetValue("UnsubscriptionInfoText"), ""); } set { this.SetValue("UnsubscriptionInfoText", value); } } /// /// Unsubscription CSS class /// public string UnsubscriptionInfoCssClass { get { return ValidationHelper.GetString(this.GetValue("UnsubscriptionInfoCssClass"), ""); } set { this.SetValue("UnsubscriptionInfoCssClass", value); } } /// /// Unsubscription button text /// public string UnsubscriptionButtonText { get { return ValidationHelper.GetString(this.GetValue("UnsubscriptionButtonText"), ""); } set { this.SetValue("UnsubscriptionButtonText", value); } } /// /// Unsubscription button CSS class /// public string UnsubscriptionButtonCssClass { get { return ValidationHelper.GetString(this.GetValue("UnsubscriptionButtonCssClass"), ""); } set { this.SetValue("UnsubscriptionButtonCssClass", value); } } /// /// Unsubscription text /// public string UnsubscriptionText { get { return ValidationHelper.GetString(this.GetValue("UnsubscriptionText"), ""); } set { this.SetValue("UnsubscriptionText", value); } } /// /// Unsuccessful unsubscription text /// public string UnsuccessfulUnsubscriptionText { get { return ValidationHelper.GetString(this.GetValue("UnsuccessfulUnsubscriptionText"), ""); } set { this.SetValue("UnsuccessfulUnsubscriptionText", value); } } #endregion #region "Methods" /// /// Content loaded event handler /// public override void OnContentLoaded() { base.OnContentLoaded(); SetupControl(); } /// /// Initializes the control properties /// protected void SetupControl() { if (this.StopProcessing) { unsubscription.StopProcessing = true; } else { unsubscription.SuccessfulUnsubscriptionText = UnsubscriptionText; unsubscription.UnsuccessfulUnsubscriptionText = UnsuccessfulUnsubscriptionText; unsubscription.UnsubscriptionInfoText = UnsubscriptionInfoText; unsubscription.UnsubscriptionInfoCssClass = UnsubscriptionInfoCssClass; unsubscription.UnsubscriptionButtonText = UnsubscriptionButtonText; unsubscription.UnsubscriptionButtonCssClass = UnsubscriptionButtonCssClass; } } /// /// Reloads the control data /// public override void ReloadData() { base.ReloadData(); SetupControl(); } #endregion }