public override void Save()
 {
     if (TemporaryBlogSettingsModified)
     {
         _targetBlogSettings.CopyFrom(_editableBlogSettings);
     }
 }
Beispiel #2
0
        public void GeneralPanel_RunAccountWizard()
        {
            var settingsCopy = TemporaryBlogSettings.CreateNew();

            settingsCopy.CopyFrom(_temporarySettings);
            SaveConfigToBlogSettings(settingsCopy);

            var result = WeblogConfigurationWizardController.EditTemporarySettings(formPreferences, settingsCopy);

            // If wizard is successful, load the new settings back into the form.
            if (result)
            {
                _temporarySettings.CopyFrom(settingsCopy);
                Config = StaticSiteConfig.LoadConfigFromBlogSettings(_temporarySettings);
                LoadConfigIntoPanels();
            }
        }
Beispiel #3
0
        private void buttonEditConfiguration_Click(object sender, EventArgs e)
        {
            // make a copy of the temporary settings to edit
            TemporaryBlogSettings blogSettings = TemporaryBlogSettings.Clone() as TemporaryBlogSettings;

            // edit account info
            if (WeblogConfigurationWizardController.EditTemporarySettings(FindForm(), blogSettings))
            {
                // go ahead and save the settings back
                TemporaryBlogSettings.CopyFrom(blogSettings);

                // note that settings have been modified
                TemporaryBlogSettingsModified = true;

                // reset ui
                InitializeSettings();
            }
        }
        private void buttonEditConfiguration_Click(object sender, EventArgs e)
        {
            // make a copy of the temporary settings to edit
            TemporaryBlogSettings blogSettings = TemporaryBlogSettings.Clone() as TemporaryBlogSettings;

            // Edit account info
            // For static sites, the advanced configuration panel will be displayed
            // Otherwise, display the wizard
            bool settingsModified = blogSettings.IsStaticSiteBlog
                ? StaticSiteAdvanced.StaticSitePreferencesController.EditTemporarySettings(FindForm(), blogSettings)
                : WeblogConfigurationWizardController.EditTemporarySettings(FindForm(), blogSettings);

            if (settingsModified)
            {
                // go ahead and save the settings back
                TemporaryBlogSettings.CopyFrom(blogSettings);

                // note that settings have been modified
                TemporaryBlogSettingsModified = true;

                // reset ui
                InitializeSettings();
            }
        }