private void OkButton_Click(object sender, RoutedEventArgs e)
        {
            PreviewDialogConfirmedHandler(spokenText.Text.Trim(), SelectedVoiceType, SelectedVoice);
            AudioSettingsDialogWindow parentWindow = Window.GetWindow(this) as AudioSettingsDialogWindow;

            parentWindow.Close();
        }
        private void OkButton_Click(object sender, RoutedEventArgs e)
        {
            DialogConfirmedHandler(SelectedVoiceType, SelectedVoice, previewCheckbox.IsChecked.GetValueOrDefault());
            if (IsDefaultVoiceChangedHandlerAssigned)
            {
                DefaultVoiceChangedHandler();
            }
            if (audioListView.IsVisible && !UpdateRankedAudioPreferences())
            {
                return;
            }
            AudioSettingStorageService.SaveAudioSettingPreference();
            AudioSettingsDialogWindow parentWindow = Window.GetWindow(this) as AudioSettingsDialogWindow;

            parentWindow.Close();
        }
        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            AudioSettingsDialogWindow parentWindow = Window.GetWindow(this) as AudioSettingsDialogWindow;

            parentWindow.Close();
        }