ACAT.Extensions.Default.UI.Dialogs.TextToSpeechSettingsForm.saveSettingsAndQuit C# (CSharp) Method

saveSettingsAndQuit() private method

Saves settings and quits the dialog. Confirms with the user first if necessary
private saveSettingsAndQuit ( ) : void
return void
        private void saveSettingsAndQuit()
        {
            if (!HasValidPreferenceValues())
            {
                return;
            }

            if (DialogUtils.Confirm(this, Resources.SaveSettings))
            {
                updateActiveEngineSettingsFromUI();
                Context.AppTTSManager.ActiveEngine.Save();
                _isDirty = false;
            }
            else
            {
                restoreInitialValues();
            }

            Windows.CloseForm(this);
        }