<commit_before>﻿using System;
using System.Linq;
using System.Windows.Forms;
using Bloom.Collection;
using Bloom.ToPalaso;

namespace Bloom.CollectionCreating
{
	public partial class LanguageIdControl : UserControl, IPageControl
	{
		public CollectionSettings _collectionInfo;
		private Action<UserControl, bool> _setNextButtonState;

		public LanguageIdControl()
		{
			InitializeComponent();
			_lookupISOControl.SelectedLanguage.LanguageTag = string.Empty;
		}

		private void OnLookupISOControlReadinessChanged(object sender, EventArgs e)
		{
			if (_collectionInfo == null)
				return;

			if (_lookupISOControl.SelectedLanguage != null)
			{
				_collectionInfo.Language1Iso639Code = _lookupISOControl.SelectedLanguage.LanguageTag;<commit_msg>BL-2919 Fix a null ref crash in New Collection<commit_after>﻿using System;
using System.Linq;
using System.Windows.Forms;
using Bloom.Collection;
using Bloom.ToPalaso;

namespace Bloom.CollectionCreating
{
	public partial class LanguageIdControl : UserControl, IPageControl
	{
		public CollectionSettings _collectionInfo;
		private Action<UserControl, bool> _setNextButtonState;

		public LanguageIdControl()
		{
			InitializeComponent();
			_lookupISOControl.SelectedLanguage = null;
		}

		private void OnLookupISOControlReadinessChanged(object sender, EventArgs e)
		{
			if (_collectionInfo == null)
				return;

			if (_lookupISOControl.SelectedLanguage != null)
			{
				_collectionInfo.Language1Iso639Code = _lookupISOControl.SelectedLanguage.LanguageTag;
{'fraction_non_alphanumeric': 0.07346128391793515, 'fraction_numerical': 0.007941760423560556, 'mean_word_length': 5.573913043478261, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3744506', 'n_tokens_mistral': 473, 'n_tokens_neox': 415, 'n_words': 97}