Пример #1
0
        public void SaveProperties(string[] configNames, IPropertyStorage storage)
        {
            Contract.Assume(storage != null);

            foreach (var prop in properties)
            {
                Contract.Assume(prop != null);
                prop.Save(configNames, storage);
            }

            if (AssemblyModeDropDown.SelectedItem != null)
            {
                storage.SetProperty(false, "", AssemblyModeName, AssemblyModeDropDown.SelectedIndex.ToString());
            }
            if (RuntimeCheckingLevelDropDown.SelectedItem != null)
            {
                storage.SetProperties(false, configNames, RuntimeCheckingLevelName, RuntimeCheckingLevelDropDown.SelectedItem.ToString());
            }
            if (ContractReferenceAssemblySelection.SelectedItem != null)
            {
                storage.SetProperties(false, configNames, ContractReferenceAssemblyName, ContractReferenceAssemblySelection.SelectedItem.ToString());
            }

            storage.SetProperties(false, configNames, WarningLevelName, WarningLevelTrackBar.Value.ToString());
        }
Пример #2
0
        public void SaveProperties(string[] configNames, IPropertyStorage storage)
        {
            Contract.Assume(storage != null);

            foreach (var prop in properties)
            {
                Contract.Assume(prop != null);
                prop.Save(configNames, storage);
            }

            if (AssemblyModeDropDown.SelectedItem != null)
            {
                storage.SetProperty(false, "", AssemblyModeName, AssemblyModeDropDown.SelectedIndex.ToString());
            }
            if (RuntimeCheckingLevelDropDown.SelectedItem != null)
            {
                storage.SetProperties(false, configNames, RuntimeCheckingLevelName, RuntimeCheckingLevelDropDown.SelectedItem.ToString());
            }
            if (ContractReferenceAssemblySelection.SelectedItem != null)
            {
                storage.SetProperties(false, configNames, ContractReferenceAssemblyName, ContractReferenceAssemblySelection.SelectedItem.ToString());
            }

            storage.SetProperties(false, configNames, WarningLevelName, WarningLevelTrackBar.Value.ToString());
        }