GetConfigurationManager() public static method

public static GetConfigurationManager ( string applicationName ) : ConfigurationManager
applicationName string
return ConfigurationManager
Beispiel #1
0
        /// <summary>
        /// Saves the form values
        /// </summary>
        private void SaveFormValues()
        {
            ConfigurationManager config = ConfigurationManager.GetConfigurationManager("WSCF05");

            if (cbSettings.Checked)
            {
                config.Write("xsdProperties", cbProperties.Checked.ToString());
                config.Write("xsdVirtualProperties", cbVirtualProperties.Checked.ToString());
                config.Write("xsdCollections", cbCollections.Checked.ToString());
                config.Write("xsdGenericList", cbGenericList.Checked.ToString());
                config.Write("xsdDataBinding", cbDataBinding.Checked.ToString());
                config.Write("xsdOrderIdentifiers", cbOrderIds.Checked.ToString());
                config.Write("xsdAdjustCasing", cbAdjustCasing.Checked.ToString());
                config.Write("xsdMultipleFiles", cbMultipleFiles.Checked.ToString());
                config.Write("xsdOverwrite", cbOverwrite.Checked.ToString());
                config.Write("xsdRememberSettings", cbSettings.Checked.ToString());
                config.Write("xsdDestinationNamespace", tbNamespace.Text);
                config.Write("xsdDestinationFilename", tbTargetFileName.Text);
            }
            else
            {
                config.Write("xsdRememberSettings", "false");
            }
            config.Persist();
        }
Beispiel #2
0
        /// <summary>
        /// Loads the values for the UI elements from the persisted storage.
        /// </summary>
        private void LoadFormValues()
        {
            ConfigurationManager config = ConfigurationManager.GetConfigurationManager("WSCF05");

            if ((cbSettings.Checked = config.ReadBoolean("xsdRememberSettings")))
            {
                cbProperties.Checked        = config.ReadBoolean("xsdProperties");
                cbVirtualProperties.Checked = config.ReadBoolean("xsdVirtualProperties");
                cbCollections.Checked       = config.ReadBoolean("xsdCollections");
                cbGenericList.Checked       = config.ReadBoolean("xsdGenericList");
                cbDataBinding.Checked       = config.ReadBoolean("xsdDataBinding");
                cbOrderIds.Checked          = config.ReadBoolean("xsdOrderIdentifiers");
                cbAdjustCasing.Checked      = config.ReadBoolean("xsdAdjustCasing");
                cbMultipleFiles.Checked     = config.ReadBoolean("xsdMultipleFiles");
                cbOverwrite.Checked         = config.ReadBoolean("xsdOverwrite");
                tbNamespace.Text            = config.Read("xsdDestinationNamespace");
                tbTargetFileName.Text       = config.Read("xsdDestinationFilename");
            }
        }