private void ThisAddIn_Shutdown(object sender, EventArgs e) { if (Settings.Default.ReplaceDefaultHtmlReport) { RunReportHook.Uninstall(); } AddinUI.ShutdownCommandBars(); _panelManager.Dispose(); Application.SelectionChanged -= Application_SelectionChanged; Application.OnKeystrokeMessageForAddon -= _shortcutManager.OnKeystrokeMessageForAddon; }
private void buttonOK_Click(object sender, System.EventArgs e) { Settings.Default.PropertyName = textBoxPropertyName.Text; Settings.Default.PropertyNamePlainText = textBoxPropertyNamePlainText.Text; if (checkBoxReplaceHtmlReports.Checked != Settings.Default.ReplaceDefaultHtmlReport) { Settings.Default.ReplaceDefaultHtmlReport = checkBoxReplaceHtmlReports.Checked; if (Settings.Default.ReplaceDefaultHtmlReport) { RunReportHook.Install(); } else { RunReportHook.Uninstall(); } } Settings.Default.Save(); }