<commit_before>using System;
using Eto.Forms;
using Eto.Drawing;

namespace Eto.Test.Sections.Controls
{
	public class TabControlSection : Panel
	{
		public TabControlSection ()
		{
			Add();			
		}

		protected virtual void Add()
		{
			var layout = new DynamicLayout(this);

			layout.Add(DefaultTabs());
		}
		
		Control DefaultTabs ()
		{
			var control = new TabControl ();
			LogEvents (control);
			
			var page = new TabPage { Text = "Tab 1" };
			page.AddDockedControl (TabOne ());
			control.TabPages.Add (page);<commit_msg>Tab control test: added Add Tab button.<commit_after>using System;
using Eto.Forms;
using Eto.Drawing;

namespace Eto.Test.Sections.Controls
{
	public class TabControlSection : Panel
	{
		public TabControlSection ()
		{
			Add();			
		}

		protected virtual void Add()
		{
			var layout = new DynamicLayout(this);
			var tabControl = DefaultTabs();
			layout.Add(tabControl);
			var button = new Button { Text = "Add Tab" };
			button.Click += (s, e) => tabControl.TabPages.Add(new TabPage { Text = "Added" });
			layout.Add(button);
		}
		
		TabControl DefaultTabs ()
		{
			var control = new TabControl ();
			LogEvents (control);
			
			var page = new TabPage { Text = "Tab 1" };
			page.AddDockedControl (TabOne ());
			control.TabPages.Add (page);
{'fraction_non_alphanumeric': 0.12363919129082426, 'fraction_numerical': 0.0015552099533437014, 'mean_word_length': 3.3043478260869565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3314631', 'n_tokens_mistral': 490, 'n_tokens_neox': 412, 'n_words': 109}