Exemple #1
0
        btnGeneralUserSettings_Click
        (
            object sender,
            EventArgs e
        )
        {
            AssertValid();

            // The GeneralUserSettings are normally edited from the TaskPane, not
            // the Ribbon, so this event handler differs from the others.

            GeneralUserSettings oGeneralUserSettings = new GeneralUserSettings();

            GeneralUserSettingsDialog oGeneralUserSettingsDialog =
                new GeneralUserSettingsDialog(oGeneralUserSettings,
                                              m_oThisWorkbook.InnerObject);

            if (oGeneralUserSettingsDialog.ShowDialog() == DialogResult.OK)
            {
                oGeneralUserSettings.Save();
            }
        }
Exemple #2
0
        //*************************************************************************
        //  Method: EditGeneralUserSettings()
        //
        /// <summary>
        /// Shows the dialog that lets the user edit his general settings.
        /// </summary>
        //*************************************************************************
        protected void EditGeneralUserSettings()
        {
            AssertValid();

            if (oNodeXLControl.IsLayingOutGraph)
            {
            return;
            }

            GeneralUserSettings oGeneralUserSettings = new GeneralUserSettings();

            GeneralUserSettingsDialog oGeneralUserSettingsDialog =
            new GeneralUserSettingsDialog(oGeneralUserSettings, m_oWorkbook);

            if (oGeneralUserSettingsDialog.ShowDialog() == DialogResult.OK)
            {
            oGeneralUserSettings.Save();
            ApplyGeneralUserSettings(oGeneralUserSettings);
            oNodeXLControl.DrawGraph();
            }
        }
        //*************************************************************************
        //  Method: btnGeneralUserSettings_Click()
        //
        /// <summary>
        /// Handles the Click event on the btnGeneralUserSettings button.
        /// </summary>
        ///
        /// <param name="sender">
        /// Standard event argument.
        /// </param>
        ///
        /// <param name="e">
        /// Standard event argument.
        /// </param>
        //*************************************************************************
        private void btnGeneralUserSettings_Click(
            object sender,
            EventArgs e
            )
        {
            AssertValid();

            // The GeneralUserSettings are normally edited from the TaskPane, not
            // the Ribbon, so this event handler differs from the others.

            GeneralUserSettings oGeneralUserSettings = new GeneralUserSettings();

            GeneralUserSettingsDialog oGeneralUserSettingsDialog =
            new GeneralUserSettingsDialog(oGeneralUserSettings,
            m_oThisWorkbook.InnerObject);

            if (oGeneralUserSettingsDialog.ShowDialog() == DialogResult.OK)
            {
            oGeneralUserSettings.Save();
            }
        }