public globalSettingsDisplay()
        {
            InitializeComponent();

            if (Program.settings != null) newSettings = Program.settings.copyTo(newSettings);

          newSettings.hDir = newSettings.tryToFindHelpDir();
            refreshTextBoxes();
            newSettings.initPropertiesBag();
            this.propertyGrid1.SelectedObject = newSettings.Bag;
        }
예제 #2
0
        public globalSettingsDisplay()
        {
            InitializeComponent();

            if (Program.settings != null)
            {
                newSettings = Program.settings.copyTo(newSettings);
            }

            newSettings.hDir = newSettings.tryToFindHelpDir();
            refreshTextBoxes();
            newSettings.initPropertiesBag();
            this.propertyGrid1.SelectedObject = newSettings.Bag;
        }
예제 #3
0
        private void applyButton_Click(object sender, EventArgs e)
        {
            newSettings.stringOfRSFileNames
                = StringCollectionConverter.convert(newSettings.defaultRSFileNames);
            globalSettings tempSettings = Program.settings;

            Program.settings          = newSettings;
            SearchIO.defaultVerbosity = newSettings.defaultVerbosity;
            try { newSettings.loadDefaultSeedAndRuleSets(); }
            catch (Exception ee)
            {
                if (DialogResult.Yes == MessageBox.Show("Settings did not work because of the following error: " + ee.ToString() +
                                                        " Revert to Previous Settings?", "Error in Settings. Revert back?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
                {
                    Program.settings = tempSettings;
                }
                return;
            }
            cancelButton_Click(sender, e);
        }