Ejemplo n.º 1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            Config.CheckUpdateEnabled = chkCheckUpdateEnabled.Checked;
            Config.CheckUpdatePeriod  = (cboCheckUpdatePeriod.SelectedIndex + 1) * 7;

            Config.ClassEditorAutoSaveBookmarkEnabled        = chkAutoSaveBookmarkEnabled.Checked;
            Config.ClassEditorAutoOpenDroppedAssemblyEnabled = chkAutoOpenDroppedAssembly.Checked;
            Config.ClassEditorRichTextBoxFont = lblRtbFont.Font;
            Config.ClassEditorBamlTranslator  = cboBamlTranslator.SelectedIndex;

            int recentPluginList = (int)nudRecentPluginList.Value;

            if (recentPluginList != Config.RecentPluginList)
            {
                _mainForm.PluginHandler.ClearPlugins();
                Config.RecentPluginList = recentPluginList;
                _mainForm.PluginHandler.LoadPlugins();
            }

            if (chkIntegrateWithExplorer.Enabled)
            {
                if (chkIntegrateWithExplorer.Checked)
                {
                    ShellExtUtils.RegisterSAE();
                }
                else
                {
                    ShellExtUtils.UnregisterSAE();
                }
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }