Builder.Common.Settings.SaveSettings C# (CSharp) Метод

SaveSettings() публичный Метод

public SaveSettings ( ) : void
Результат void
        public void SaveSettings()
        {
            Configuration c = ConfigurationManager.OpenExeConfiguration("hMailServer builder.exe");

            c.AppSettings.Settings["SourcePath"].Value = SourcePath;
            c.AppSettings.Settings["BuildNumber"].Value = BuildNumber.ToString();
            c.AppSettings.Settings["Version"].Value = Version;
            c.AppSettings.Settings["VSPath"].Value = VSPath;
            c.AppSettings.Settings["InnoSetupPath"].Value = InnoSetupPath;
            c.AppSettings.Settings["SubversionPath"].Value = SubversionPath;
            c.AppSettings.Settings["MSBuildPath"].Value = MSBuildPath;

            c.Save(ConfigurationSaveMode.Modified);
        }

Usage Example

Пример #1
0
        private void SaveSettings()
        {
            Settings settings = new Settings();
             settings.LoadSettings();

             settings.SourcePath = txtPathSource.Text;
             settings.BuildNumber = Convert.ToInt32(txtBuildNumber.Text);
             settings.Version  = txtVersion.Text;
             settings.VSPath = txtPathVS8.Text;
             settings.InnoSetupPath = txtPathInnoSetup.Text;
             settings.SubversionPath = txtPathSubversion.Text;

             settings.SaveSettings();
        }