using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


// revenir sur l'event CurrentChanged ?

namespace Babebi4
{
	public partial class MainForm : Form
	{
		private string filteringExpression__Language = null;

		private void bindingSource__Language__CurrentChanged(object sender, EventArgs e)
		{
			if (this.DoNotTriggerCurrentChangedEvent)
			{
				return;
			}

			this.Current__Language = (BabebiDataSet.LanguageRow)(((DataRowView)(this.bindingSource__Language.Current)).Row);

			this.tabPage__Language.Text = "   " + this.Current__Language.Code.ToUpper() + "   ";

			this.currentChanged__Language();
		}

		private void currentChanged__Language()
		{
			this.filteringExpression__Language = "LanguageCode = '" + this.Current__Language.Code + "'";

			this.filter__LetterOrSymbol_Language();
			this.filter__WordType_Language();
			this.filter__DerivatingWordType_Language();
			this.filter__DerivatedWordType_Language();

			if (this.guiTable__DerivatingWordType_DerivatedWordType != null)
			{
				this.guiTable__DerivatingWordType_DerivatedWordType.Populate();
			}

			this.filter__Derivating_Language();

			this.filter__Word_Language();
			this.filter__Word_LanguageWord__of__Word();

			this.filter__LanguageWord();
		}

		private void button__Language__Create_Click(object sender, EventArgs e)
		{
			Form__Language__Create form__language = new Form__Language__Create(this);

			form__language.ShowDialog(this);
		}
	}
}
