/**
         *
         * Event handler when the YES button is clicked.
         *
         */
        private void button1_Click(object sender, EventArgs e)
        {
            log.Debug(
                "Secure Send Confirmation dialog: User pressed YES button!");

            // First, check if the checkbox to not display in the future is
            // checked.  If checked, we will need to persist the user setting
            // to TURN OFF secure email send confirmation.  The only way a
            // user can TURN ON the secure email send confirmation is to update
            // their user settings (either via the Settings menu option or
            // updating the configuration file for the AddIn in the User's Local
            // Application Data folder for the Secure Email Outlook AddIn.
            if (checkBox1.Checked == true)
            {
                Properties.Settings.Default.secureEmailSendConfirmation = false;

                // Persist changes to user settings between application sessions.
                Properties.Settings.Default.Save();

                // Need to update the cached user settings...
                SecureEmailOutlookAddInSettingsForm.updateUserSettings();
            }

            this.DialogResult = DialogResult.Yes;

            // Do a Hide() instead of a Close(), which kills the Form object...
            Hide();
        }
        private void secureEmailSettingsForm_Click(
            object sender, RibbonControlEventArgs e)
        {
            // Need to force the update here...in the case where the show
            // confirmation dialog setting is updated outside the settings form.
            SecureEmailOutlookAddInSettingsForm.updateUserSettings();

            // Display the form to the user...
            settingsForm.ShowDialog();
        }
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {
            try
            {
                // Initialize the forms that will be used with the ribbon...
                settingsForm = new SecureEmailOutlookAddInSettingsForm();
                aboutForm    = new SecureEmailOutlookAddInAboutForm();
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            this.group1.Label = String.Format(
                this.group1.Label, DEFAULT_ORGANIZATION_NAME_PROPERTY);
        }