private void AddLanguage_Click([NotNull] object sender, [NotNull] RoutedEventArgs e)
        {
            var exisitingCultures = _resourceManager.Cultures
                                    .Select(c => c.Culture)
                                    .Where(c => c != null);

            var languageSelection = new LanguageSelectionBoxViewModel(exisitingCultures);

            if (!ConfirmationDialog.Show(this.GetExportProvider(), languageSelection, Properties.Resources.Title).GetValueOrDefault())
            {
                return;
            }

            WaitCursor.Start(this);

            var culture = languageSelection.SelectedLanguage;

            DataGrid.CreateNewLanguageColumn(_configuration, culture);

            if (!_configuration.AutoCreateNewLanguageFiles)
            {
                return;
            }

            if (!_resourceManager.ResourceEntities.All(resourceEntity => _resourceManager.CanEdit(resourceEntity, culture)))
            {
                // nothing left to do, message already shown.
            }
        }
        private void AddLanguage_Click(object sender, RoutedEventArgs e)
        {
            var exisitingCultures = _resourceManager.CultureKeys
                                    .Select(c => c.Culture)
                                    .Where(c => c != null);

            var languageSelection = new LanguageSelectionBoxViewModel(exisitingCultures);

            if (!ConfirmationDialog.Show(this.GetExportProvider(), languageSelection, Properties.Resources.Title).GetValueOrDefault())
            {
                return;
            }

            WaitCursor.Start(this);

            var culture = languageSelection.SelectedLanguage;

            DataGrid.CreateNewLanguageColumn(_resourceManager, culture);

            _resourceManager.NewLanguageAdded(culture);
        }