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.CMSImportExport; using CMS.GlobalHelper; using CMS.UIControls; public partial class CMSModules_ImportExport_Controls_Import_Site_forums_forum : ImportExportControl { /// /// True if import into existing site. /// protected bool ExistingSite { get { if (Settings != null) { return ((SiteImportSettings)Settings).ExistingSite; } return true; } } /// /// True if the data should be imported. /// protected bool Import { get { if (ExistingSite) { return false; } return chkObject.Checked; } } protected void Page_Load(object sender, EventArgs e) { Visible = !ExistingSite; if (!ExistingSite) { chkObject.Visible = true; chkObject.Text = GetString("CMSImport_Forum.ImportForum"); } } /// /// Gets settings. /// public override void SaveSettings() { Settings.SetSettings(ImportExportHelper.SETTINGS_FORUM_POSTS, Import); } /// /// Reload data. /// public override void ReloadData() { if (!ExistingSite) { chkObject.Checked = ValidationHelper.GetBoolean(Settings.GetSettings(ImportExportHelper.SETTINGS_FORUM_POSTS), true); } } }