示例#1
0
        /// <summary>
        /// Register Install & Uninstall Events
        /// </summary>
        /// <param name="umbracoApplication"></param>
        /// <param name="applicationContext"></param>
        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            //Check to see if appSetting AnalyticsStartupInstalled is true or even present
            var installAppSetting = WebConfigurationManager.AppSettings[InstallHelpers.AppSettingKey];

            if (string.IsNullOrEmpty(installAppSetting) || installAppSetting != true.ToString())
            {
                //Check to see if language keys for section needs to be added
                InstallHelpers.AddTranslations();

                //Check to see if section needs to be added
                InstallHelpers.AddSection(applicationContext);

                //Add Section Dashboard XML
                InstallHelpers.AddSectionDashboard();

                InstallHelpers.AddHttpModule();

                // we can't do this here (nodes not exists yet):
                //InstallHelpers.PublishContentNodes();
                //InstallHelpers.AddAppConfigSections();
            }



            //Add OLD Style Package Event
            InstalledPackage.BeforeDelete += InstalledPackage_BeforeDelete;

            //Add Tree Node Rendering Event - Used to check if user is admin to display settings node in tree
            TreeControllerBase.TreeNodesRendering += TreeControllerBase_TreeNodesRendering;
        }
示例#2
0
        /// <summary>
        /// Register Install & Uninstall Events
        /// </summary>
        /// <param name="umbracoApplication"></param>
        /// <param name="applicationContext"></param>
        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            //Check to see if appSetting Ultima2c is true or even present
            var installAppSetting = WebConfigurationManager.AppSettings[InstallHelpers.AppSettingKey];

            if (string.IsNullOrEmpty(installAppSetting) || installAppSetting != true.ToString())
            {
                //Check to see if language keys for section needs to be added
                InstallHelpers.AddHttpModule();

                // we can't do this here (nodes not exists yet):
                //InstallHelpers.PublishContentNodes();
                //InstallHelpers.AddAppConfigSections();

                InstalledPackage.AfterSave += InstalledPackage_AfterSave;
            }

            //Add OLD Style Package Event
            InstalledPackage.BeforeDelete += InstalledPackage_BeforeDelete;
        }