using System; using CMS.CMSHelper; using CMS.ExtendedControls; using CMS.FormControls; using CMS.GlobalHelper; using CMS.LicenseProvider; using CMS.OnlineMarketing; using CMS.SettingsProvider; /// /// Displays the description macro setting, and allows the user to edit it. /// public partial class CMSModules_ContactManagement_FormControls_SalesForce_Description : FormEngineUserControl { #region "Public properties" /// /// Gets or sets the description macro. /// public override object Value { get { return DescriptionMacroEditor.Text; } set { DescriptionMacroEditor.Text = value as string; } } /// /// Gets or sets whether the control is enabled. /// public override bool Enabled { get { return base.Enabled; } set { DescriptionMacroEditor.ReadOnly = !value; base.Enabled = value; } } #endregion #region "Life-cycle methods" protected override void OnInit(EventArgs e) { base.OnInit(e); ContactInfo contact = new ContactInfo(); ContextResolver resolver = CMSContext.CurrentResolver.CreateContextChild(); resolver.SetNamedSourceData("Contact", contact); DescriptionMacroEditor.Resolver = resolver; DescriptionMacroEditor.Editor.Language = LanguageEnum.Text; } #endregion }