예제 #1
0
    /// <summary>
    /// Saves the settings.
    /// </summary>
    private void SaveSettings()
    {
        SettingsGroupViewer.SaveChanges();

        bool containsDebugKey       = false;
        bool containsPerformanceKey = false;

        foreach (var keyItem in SettingsGroupViewer.KeyItems)
        {
            if (keyItem.CategoryName.StartsWithCSafe("cms.debug", true))
            {
                containsDebugKey = true;
            }

            if (keyItem.CategoryName.StartsWithCSafe("cms.performance", true))
            {
                containsPerformanceKey = true;
            }
        }

        // Special case for Debug settings - debug settings have to be reloaded to take effect
        if (containsDebugKey)
        {
            DebugHelper.ResetDebugSettings();
        }

        // Special case for performance settings - performance settings have to be reloaded to take effect
        if (containsPerformanceKey)
        {
            RequestHelper.ResetPerformanceSettings();
        }
    }
 void HeaderActions_ActionPerformed(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "Save")
     {
         SettingsGroupViewer.SaveChanges();
     }
 }
예제 #3
0
    /// <summary>
    /// Saves the settings.
    /// </summary>
    private void SaveSettings()
    {
        SettingsGroupViewer.SaveChanges();

        // Special case for Debug category - debug settings have to be reloaded to take effect
        if (SettingsGroupViewer.CategoryName.ToLower() == "cms.system.debug")
        {
            CMSFunctions.ResetDebugSettings();
        }
        else if (SettingsGroupViewer.CategoryName.ToLower() == "cms.system.performance")
        {
            RequestHelper.ResetPerformanceSettings();
        }
    }
 /// <summary>
 /// Handles saving of configuration.
 /// </summary>
 protected override void SaveChanges()
 {
     SettingsGroupViewer.SaveChanges();
 }