using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using QCRPG.Framework;

namespace QCRPG.TSL.BT;

public class BTConfigUserControl : UserControlBase, IConfigurable
{
	private BTConfigSettings btConfigSettings;

	private bool nvmInitialDirectorySet;

	private bool patchInitialDirectorySet;

	private bool scriptInitialDirectorySet;

	private IContainer components;

	private Button buttonChooseDefaultBtPatchFile;

	private Label labelDefaultBtPatchFile;

	private Button buttonChooseDefaultBtNvmFile;

	private TextBox textBoxDefaultBtPatchFile;

	private TextBox textBoxDefaultBtNvmFile;

	private Label labelDefaultBtNvmFile;

	private Label labelDefaultScriptFile;

	private TextBox textBoxDefaultScriptFile;

	private Button buttonChooseDefaultScriptFile;

	private CheckBox checkBoxSkipNVMResponseChecks;

	private CheckBox checkBoxSkipPatchResponseChecks;

	private Label label1;

	private GroupBox groupBox1;

	private ComboBox comboBoxBringUpInitialRate;

	private CheckBox checkBoxSendHostWake;

	private GroupBox groupBox2;

	private CheckBox checkBoxConvertNVMToBin;

	private TextBox textBoxEventTimeout;

	private Label label2;

	private ComboBox comboBoxBringUpInitialFlowControl;

	private Label label3;

	private Button buttonResetEventTimeout;

	public BTConfigUserControl(BTConfigSettings btConfigSettings)
		: base("Config")
	{
		this.btConfigSettings = btConfigSettings;
		InitializeComponent();
	}

	public Configuration GetConfiguration()
	{
		Configuration configuration = new Configuration();
		configuration.SetString("DefaultBTNVMFile", btConfigSettings.DefaultBTNVMFile);
		configuration.SetString("DefaultBTPatchFile", btConfigSettings.DefaultBTPatchFile);
		configuration.SetString("DefaultBTScriptFile", btConfigSettings.DefaultBTScriptFile);
		configuration.SetBool("SkipNVMResponseChecks", btConfigSettings.SkipNVMResponseChecks);
		configuration.SetBool("SkipPatchResponseChecks", btConfigSettings.SkipPatchResponseChecks);
		configuration.SetInt("BringUpInitialRate", btConfigSettings.BringUpInitialRate);
		configuration.SetString("BringUpInitialFlowControl", btConfigSettings.BringUpInitialFlowControl);
		configuration.SetBool("BringUpSendWakeByte", btConfigSettings.BringupSendWakeByte);
		configuration.SetBool("ConvertNVMToBin", btConfigSettings.ConvertNVMToBin);
		if (btConfigSettings.EventTimeout > 0)
		{
			configuration.SetInt("EventTimeout", btConfigSettings.EventTimeout);
		}
		else
		{
			configuration.SetInt("EventTimeout", 2000);
		}
		return configuration;
	}

	public void SetConfiguration(Configuration configuration)
	{
		btConfigSettings.DefaultBTNVMFile = configuration.GetString("DefaultBTNVMFile", "");
		textBoxDefaultBtNvmFile.Text = btConfigSettings.DefaultBTNVMFile;
		btConfigSettings.DefaultBTPatchFile = configuration.GetString("DefaultBTPatchFile", "");
		textBoxDefaultBtPatchFile.Text = btConfigSettings.DefaultBTPatchFile;
		btConfigSettings.DefaultBTScriptFile = configuration.GetString("DefaultBTScriptFile", "");
		textBoxDefaultScriptFile.Text = btConfigSettings.DefaultBTScriptFile;
		btConfigSettings.SkipNVMResponseChecks = configuration.GetBool("SkipNVMResponseChecks", defaultValue: false);
		checkBoxSkipNVMResponseChecks.Checked = btConfigSettings.SkipNVMResponseChecks;
		btConfigSettings.SkipPatchResponseChecks = configuration.GetBool("SkipPatchResponseChecks", defaultValue: false);
		checkBoxSkipPatchResponseChecks.Checked = btConfigSettings.SkipPatchResponseChecks;
		List<int> list = new List<int>();
		list.Add(300);
		list.Add(1200);
		list.Add(2400);
		list.Add(4800);
		list.Add(9600);
		list.Add(19200);
		list.Add(34800);
		list.Add(57600);
		list.Add(115200);
		list.Add(3000000);
		list.Add(3200000);
		List<int> list2 = list;
		comboBoxBringUpInitialRate.Items.Clear();
		foreach (int item in list2)
		{
			comboBoxBringUpInitialRate.Items.Add(item);
		}
		btConfigSettings.BringUpInitialRate = configuration.GetInt("BringUpInitialRate", 115200);
		comboBoxBringUpInitialRate.Text = btConfigSettings.BringUpInitialRate.ToString();
		List<string> list3 = new List<string>();
		list3.Add("None");
		list3.Add("Hardware");
		list3.Add("XOnXOff");
		list3.Add("HardwareXOnXOff");
		List<string> list4 = list3;
		foreach (string item2 in list4)
		{
			comboBoxBringUpInitialFlowControl.Items.Add(item2);
		}
		btConfigSettings.BringUpInitialFlowControl = configuration.GetString("BringUpInitialFlowControl", "None");
		comboBoxBringUpInitialFlowControl.SelectedItem = btConfigSettings.BringUpInitialFlowControl;
		btConfigSettings.BringupSendWakeByte = configuration.GetBool("BringUpSendWakeByte", defaultValue: false);
		checkBoxSendHostWake.Checked = btConfigSettings.BringupSendWakeByte;
		btConfigSettings.ConvertNVMToBin = configuration.GetBool("ConvertNVMToBin", defaultValue: true);
		checkBoxConvertNVMToBin.Checked = btConfigSettings.ConvertNVMToBin;
		btConfigSettings.EventTimeout = configuration.GetInt("EventTimeout", 2000);
		textBoxEventTimeout.Text = btConfigSettings.EventTimeout.ToString();
	}

	private void buttonChooseDefaultBtNvmFile_Click(object sender, EventArgs e)
	{
		OpenFileDialog openFileDialog = new OpenFileDialog();
		openFileDialog.Filter = "NVM Files (*.nvm)|*.nvm| BIN/TLV Files (*.BIN)|*.BIN|All Files (*.*)|*.*";
		if (openFileDialog.ShowDialog() == DialogResult.OK)
		{
			btConfigSettings.DefaultBTNVMFile = openFileDialog.FileName;
			textBoxDefaultBtNvmFile.Text = btConfigSettings.DefaultBTNVMFile;
		}
	}

	private void textBoxDefaultBtNvmFile_TextChanged(object sender, EventArgs e)
	{
		btConfigSettings.DefaultBTNVMFile = textBoxDefaultBtNvmFile.Text;
	}

	private void buttonChooseDefaultBtPatchFile_Click(object sender, EventArgs e)
	{
		OpenFileDialog openFileDialog = new OpenFileDialog();
		openFileDialog.Filter = "Patch Image Files (*.tlv)|*.tlv|(*.img)|*.img|All Files (*.*)|*.*";
		if (openFileDialog.ShowDialog() == DialogResult.OK)
		{
			btConfigSettings.DefaultBTPatchFile = openFileDialog.FileName;
			textBoxDefaultBtPatchFile.Text = btConfigSettings.DefaultBTPatchFile;
		}
	}

	private void textBoxDefaultBtPatchFile_TextChanged(object sender, EventArgs e)
	{
		btConfigSettings.DefaultBTPatchFile = textBoxDefaultBtPatchFile.Text;
	}

	private void buttonChooseDefaultScriptFile_Click(object sender, EventArgs e)
	{
		OpenFileDialog openFileDialog = new OpenFileDialog();
		openFileDialog.Filter = "TCL Script Files (*.tcl)|*.tcl|All Files (*.*)|*.*";
		if (openFileDialog.ShowDialog() == DialogResult.OK)
		{
			btConfigSettings.DefaultBTScriptFile = openFileDialog.FileName;
			textBoxDefaultScriptFile.Text = btConfigSettings.DefaultBTScriptFile;
		}
	}

	private void textBoxDefaultScriptFile_TextChanged(object sender, EventArgs e)
	{
		btConfigSettings.DefaultBTScriptFile = textBoxDefaultScriptFile.Text;
	}

	private void checkBoxSkipNVMResponseChecks_CheckedChanged(object sender, EventArgs e)
	{
		btConfigSettings.SkipNVMResponseChecks = checkBoxSkipNVMResponseChecks.Checked;
	}

	private void checkBoxSkipPatchResponseChecks_CheckedChanged(object sender, EventArgs e)
	{
		btConfigSettings.SkipPatchResponseChecks = checkBoxSkipPatchResponseChecks.Checked;
	}

	private void comboBoxBringUpFinalRate_TextChanged(object sender, EventArgs e)
	{
		int.TryParse(comboBoxBringUpInitialRate.Text, out btConfigSettings.BringUpInitialRate);
	}

	private void checkBoxSendHostWake_CheckedChanged(object sender, EventArgs e)
	{
		btConfigSettings.BringupSendWakeByte = checkBoxSendHostWake.Checked;
	}

	private void checkBoxConvertNVMToBin_CheckedChanged(object sender, EventArgs e)
	{
		btConfigSettings.ConvertNVMToBin = checkBoxConvertNVMToBin.Checked;
	}

	private void textBoxEventTimeout_TextChanged(object sender, EventArgs e)
	{
		int.TryParse(textBoxEventTimeout.Text, out btConfigSettings.EventTimeout);
		if (btConfigSettings.EventTimeout <= 0)
		{
			btConfigSettings.EventTimeout = 2000;
			textBoxEventTimeout.Text = btConfigSettings.EventTimeout.ToString();
		}
	}

	private void comboBoxBringUpInitialFlowControl_TextChanged(object sender, EventArgs e)
	{
		btConfigSettings.BringUpInitialFlowControl = comboBoxBringUpInitialFlowControl.Text;
	}

	private void buttonResetEventTimeout_Click(object sender, EventArgs e)
	{
		textBoxEventTimeout.Text = 2000.ToString();
		btConfigSettings.EventTimeout = 2000;
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.buttonChooseDefaultBtPatchFile = new System.Windows.Forms.Button();
		this.labelDefaultBtPatchFile = new System.Windows.Forms.Label();
		this.buttonChooseDefaultBtNvmFile = new System.Windows.Forms.Button();
		this.textBoxDefaultBtPatchFile = new System.Windows.Forms.TextBox();
		this.textBoxDefaultBtNvmFile = new System.Windows.Forms.TextBox();
		this.labelDefaultBtNvmFile = new System.Windows.Forms.Label();
		this.labelDefaultScriptFile = new System.Windows.Forms.Label();
		this.textBoxDefaultScriptFile = new System.Windows.Forms.TextBox();
		this.buttonChooseDefaultScriptFile = new System.Windows.Forms.Button();
		this.checkBoxSkipNVMResponseChecks = new System.Windows.Forms.CheckBox();
		this.checkBoxSkipPatchResponseChecks = new System.Windows.Forms.CheckBox();
		this.label1 = new System.Windows.Forms.Label();
		this.groupBox1 = new System.Windows.Forms.GroupBox();
		this.comboBoxBringUpInitialFlowControl = new System.Windows.Forms.ComboBox();
		this.label3 = new System.Windows.Forms.Label();
		this.checkBoxSendHostWake = new System.Windows.Forms.CheckBox();
		this.comboBoxBringUpInitialRate = new System.Windows.Forms.ComboBox();
		this.groupBox2 = new System.Windows.Forms.GroupBox();
		this.buttonResetEventTimeout = new System.Windows.Forms.Button();
		this.textBoxEventTimeout = new System.Windows.Forms.TextBox();
		this.label2 = new System.Windows.Forms.Label();
		this.checkBoxConvertNVMToBin = new System.Windows.Forms.CheckBox();
		this.groupBox1.SuspendLayout();
		this.groupBox2.SuspendLayout();
		base.SuspendLayout();
		this.buttonChooseDefaultBtPatchFile.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.buttonChooseDefaultBtPatchFile.AutoSize = true;
		this.buttonChooseDefaultBtPatchFile.Location = new System.Drawing.Point(359, 37);
		this.buttonChooseDefaultBtPatchFile.Name = "buttonChooseDefaultBtPatchFile";
		this.buttonChooseDefaultBtPatchFile.Size = new System.Drawing.Size(26, 23);
		this.buttonChooseDefaultBtPatchFile.TabIndex = 10;
		this.buttonChooseDefaultBtPatchFile.Text = "...";
		this.buttonChooseDefaultBtPatchFile.UseVisualStyleBackColor = true;
		this.buttonChooseDefaultBtPatchFile.Click += new System.EventHandler(buttonChooseDefaultBtPatchFile_Click);
		this.labelDefaultBtPatchFile.AutoSize = true;
		this.labelDefaultBtPatchFile.Location = new System.Drawing.Point(15, 42);
		this.labelDefaultBtPatchFile.Name = "labelDefaultBtPatchFile";
		this.labelDefaultBtPatchFile.Size = new System.Drawing.Size(71, 13);
		this.labelDefaultBtPatchFile.TabIndex = 9;
		this.labelDefaultBtPatchFile.Text = "BT Patch File";
		this.buttonChooseDefaultBtNvmFile.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.buttonChooseDefaultBtNvmFile.AutoSize = true;
		this.buttonChooseDefaultBtNvmFile.Location = new System.Drawing.Point(359, 11);
		this.buttonChooseDefaultBtNvmFile.Name = "buttonChooseDefaultBtNvmFile";
		this.buttonChooseDefaultBtNvmFile.Size = new System.Drawing.Size(26, 23);
		this.buttonChooseDefaultBtNvmFile.TabIndex = 8;
		this.buttonChooseDefaultBtNvmFile.Text = "...";
		this.buttonChooseDefaultBtNvmFile.UseVisualStyleBackColor = true;
		this.buttonChooseDefaultBtNvmFile.Click += new System.EventHandler(buttonChooseDefaultBtNvmFile_Click);
		this.textBoxDefaultBtPatchFile.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.textBoxDefaultBtPatchFile.Location = new System.Drawing.Point(131, 39);
		this.textBoxDefaultBtPatchFile.Name = "textBoxDefaultBtPatchFile";
		this.textBoxDefaultBtPatchFile.Size = new System.Drawing.Size(222, 20);
		this.textBoxDefaultBtPatchFile.TabIndex = 6;
		this.textBoxDefaultBtPatchFile.TextChanged += new System.EventHandler(textBoxDefaultBtPatchFile_TextChanged);
		this.textBoxDefaultBtNvmFile.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.textBoxDefaultBtNvmFile.Location = new System.Drawing.Point(131, 13);
		this.textBoxDefaultBtNvmFile.Name = "textBoxDefaultBtNvmFile";
		this.textBoxDefaultBtNvmFile.Size = new System.Drawing.Size(222, 20);
		this.textBoxDefaultBtNvmFile.TabIndex = 7;
		this.textBoxDefaultBtNvmFile.TextChanged += new System.EventHandler(textBoxDefaultBtNvmFile_TextChanged);
		this.labelDefaultBtNvmFile.AutoSize = true;
		this.labelDefaultBtNvmFile.Location = new System.Drawing.Point(15, 16);
		this.labelDefaultBtNvmFile.Name = "labelDefaultBtNvmFile";
		this.labelDefaultBtNvmFile.Size = new System.Drawing.Size(67, 13);
		this.labelDefaultBtNvmFile.TabIndex = 5;
		this.labelDefaultBtNvmFile.Text = "BT NVM File";
		this.labelDefaultScriptFile.AutoSize = true;
		this.labelDefaultScriptFile.Location = new System.Drawing.Point(15, 69);
		this.labelDefaultScriptFile.Name = "labelDefaultScriptFile";
		this.labelDefaultScriptFile.Size = new System.Drawing.Size(53, 13);
		this.labelDefaultScriptFile.TabIndex = 11;
		this.labelDefaultScriptFile.Text = "Script File";
		this.textBoxDefaultScriptFile.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.textBoxDefaultScriptFile.Location = new System.Drawing.Point(131, 66);
		this.textBoxDefaultScriptFile.Name = "textBoxDefaultScriptFile";
		this.textBoxDefaultScriptFile.Size = new System.Drawing.Size(222, 20);
		this.textBoxDefaultScriptFile.TabIndex = 12;
		this.textBoxDefaultScriptFile.TextChanged += new System.EventHandler(textBoxDefaultScriptFile_TextChanged);
		this.buttonChooseDefaultScriptFile.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.buttonChooseDefaultScriptFile.AutoSize = true;
		this.buttonChooseDefaultScriptFile.Location = new System.Drawing.Point(359, 64);
		this.buttonChooseDefaultScriptFile.Name = "buttonChooseDefaultScriptFile";
		this.buttonChooseDefaultScriptFile.Size = new System.Drawing.Size(26, 23);
		this.buttonChooseDefaultScriptFile.TabIndex = 13;
		this.buttonChooseDefaultScriptFile.Text = "...";
		this.buttonChooseDefaultScriptFile.UseVisualStyleBackColor = true;
		this.buttonChooseDefaultScriptFile.Click += new System.EventHandler(buttonChooseDefaultScriptFile_Click);
		this.checkBoxSkipNVMResponseChecks.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.checkBoxSkipNVMResponseChecks.AutoSize = true;
		this.checkBoxSkipNVMResponseChecks.Location = new System.Drawing.Point(391, 15);
		this.checkBoxSkipNVMResponseChecks.Name = "checkBoxSkipNVMResponseChecks";
		this.checkBoxSkipNVMResponseChecks.Size = new System.Drawing.Size(131, 17);
		this.checkBoxSkipNVMResponseChecks.TabIndex = 14;
		this.checkBoxSkipNVMResponseChecks.Text = "Skip response checks";
		this.checkBoxSkipNVMResponseChecks.UseVisualStyleBackColor = true;
		this.checkBoxSkipNVMResponseChecks.CheckedChanged += new System.EventHandler(checkBoxSkipNVMResponseChecks_CheckedChanged);
		this.checkBoxSkipPatchResponseChecks.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.checkBoxSkipPatchResponseChecks.AutoSize = true;
		this.checkBoxSkipPatchResponseChecks.Location = new System.Drawing.Point(391, 41);
		this.checkBoxSkipPatchResponseChecks.Name = "checkBoxSkipPatchResponseChecks";
		this.checkBoxSkipPatchResponseChecks.Size = new System.Drawing.Size(131, 17);
		this.checkBoxSkipPatchResponseChecks.TabIndex = 14;
		this.checkBoxSkipPatchResponseChecks.Text = "Skip response checks";
		this.checkBoxSkipPatchResponseChecks.UseVisualStyleBackColor = true;
		this.checkBoxSkipPatchResponseChecks.CheckedChanged += new System.EventHandler(checkBoxSkipPatchResponseChecks_CheckedChanged);
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(15, 31);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(91, 13);
		this.label1.TabIndex = 15;
		this.label1.Text = "Bringup baud rate";
		this.groupBox1.Controls.Add(this.comboBoxBringUpInitialFlowControl);
		this.groupBox1.Controls.Add(this.label3);
		this.groupBox1.Controls.Add(this.checkBoxSendHostWake);
		this.groupBox1.Controls.Add(this.comboBoxBringUpInitialRate);
		this.groupBox1.Controls.Add(this.label1);
		this.groupBox1.Location = new System.Drawing.Point(18, 108);
		this.groupBox1.Name = "groupBox1";
		this.groupBox1.Size = new System.Drawing.Size(246, 120);
		this.groupBox1.TabIndex = 16;
		this.groupBox1.TabStop = false;
		this.groupBox1.Text = "Platform bring up";
		this.comboBoxBringUpInitialFlowControl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.comboBoxBringUpInitialFlowControl.FormattingEnabled = true;
		this.comboBoxBringUpInitialFlowControl.Location = new System.Drawing.Point(113, 56);
		this.comboBoxBringUpInitialFlowControl.Name = "comboBoxBringUpInitialFlowControl";
		this.comboBoxBringUpInitialFlowControl.Size = new System.Drawing.Size(123, 21);
		this.comboBoxBringUpInitialFlowControl.TabIndex = 19;
		this.comboBoxBringUpInitialFlowControl.TextChanged += new System.EventHandler(comboBoxBringUpInitialFlowControl_TextChanged);
		this.label3.AutoSize = true;
		this.label3.Location = new System.Drawing.Point(41, 59);
		this.label3.Name = "label3";
		this.label3.Size = new System.Drawing.Size(65, 13);
		this.label3.TabIndex = 18;
		this.label3.Text = "Flow Control";
		this.checkBoxSendHostWake.AutoSize = true;
		this.checkBoxSendHostWake.Location = new System.Drawing.Point(18, 97);
		this.checkBoxSendHostWake.Name = "checkBoxSendHostWake";
		this.checkBoxSendHostWake.Size = new System.Drawing.Size(138, 17);
		this.checkBoxSendHostWake.TabIndex = 17;
		this.checkBoxSendHostWake.Text = "Send wake byte to host";
		this.checkBoxSendHostWake.UseVisualStyleBackColor = true;
		this.checkBoxSendHostWake.CheckedChanged += new System.EventHandler(checkBoxSendHostWake_CheckedChanged);
		this.comboBoxBringUpInitialRate.FormattingEnabled = true;
		this.comboBoxBringUpInitialRate.Location = new System.Drawing.Point(113, 28);
		this.comboBoxBringUpInitialRate.Name = "comboBoxBringUpInitialRate";
		this.comboBoxBringUpInitialRate.Size = new System.Drawing.Size(123, 21);
		this.comboBoxBringUpInitialRate.TabIndex = 16;
		this.comboBoxBringUpInitialRate.TextChanged += new System.EventHandler(comboBoxBringUpFinalRate_TextChanged);
		this.groupBox2.Controls.Add(this.buttonResetEventTimeout);
		this.groupBox2.Controls.Add(this.textBoxEventTimeout);
		this.groupBox2.Controls.Add(this.label2);
		this.groupBox2.Controls.Add(this.checkBoxConvertNVMToBin);
		this.groupBox2.Location = new System.Drawing.Point(286, 108);
		this.groupBox2.Name = "groupBox2";
		this.groupBox2.Size = new System.Drawing.Size(320, 86);
		this.groupBox2.TabIndex = 17;
		this.groupBox2.TabStop = false;
		this.groupBox2.Text = "Host Configuration";
		this.buttonResetEventTimeout.Location = new System.Drawing.Point(230, 40);
		this.buttonResetEventTimeout.Name = "buttonResetEventTimeout";
		this.buttonResetEventTimeout.Size = new System.Drawing.Size(75, 37);
		this.buttonResetEventTimeout.TabIndex = 3;
		this.buttonResetEventTimeout.Text = "Reset Event Timeout";
		this.buttonResetEventTimeout.UseVisualStyleBackColor = true;
		this.buttonResetEventTimeout.Click += new System.EventHandler(buttonResetEventTimeout_Click);
		this.textBoxEventTimeout.Location = new System.Drawing.Point(123, 49);
		this.textBoxEventTimeout.Name = "textBoxEventTimeout";
		this.textBoxEventTimeout.Size = new System.Drawing.Size(100, 20);
		this.textBoxEventTimeout.TabIndex = 2;
		this.textBoxEventTimeout.TextChanged += new System.EventHandler(textBoxEventTimeout_TextChanged);
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(6, 52);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(113, 13);
		this.label2.TabIndex = 1;
		this.label2.Text = "Event Timeout (msec):";
		this.checkBoxConvertNVMToBin.AutoSize = true;
		this.checkBoxConvertNVMToBin.Location = new System.Drawing.Point(6, 19);
		this.checkBoxConvertNVMToBin.Name = "checkBoxConvertNVMToBin";
		this.checkBoxConvertNVMToBin.Size = new System.Drawing.Size(187, 17);
		this.checkBoxConvertNVMToBin.TabIndex = 0;
		this.checkBoxConvertNVMToBin.Text = "Convert NVM to BIN for download";
		this.checkBoxConvertNVMToBin.UseVisualStyleBackColor = true;
		this.checkBoxConvertNVMToBin.CheckedChanged += new System.EventHandler(checkBoxConvertNVMToBin_CheckedChanged);
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.Controls.Add(this.groupBox2);
		base.Controls.Add(this.groupBox1);
		base.Controls.Add(this.checkBoxSkipPatchResponseChecks);
		base.Controls.Add(this.checkBoxSkipNVMResponseChecks);
		base.Controls.Add(this.buttonChooseDefaultScriptFile);
		base.Controls.Add(this.textBoxDefaultScriptFile);
		base.Controls.Add(this.labelDefaultScriptFile);
		base.Controls.Add(this.buttonChooseDefaultBtPatchFile);
		base.Controls.Add(this.labelDefaultBtPatchFile);
		base.Controls.Add(this.buttonChooseDefaultBtNvmFile);
		base.Controls.Add(this.textBoxDefaultBtPatchFile);
		base.Controls.Add(this.textBoxDefaultBtNvmFile);
		base.Controls.Add(this.labelDefaultBtNvmFile);
		base.Name = "BTConfigUserControl";
		base.Size = new System.Drawing.Size(525, 300);
		this.groupBox1.ResumeLayout(false);
		this.groupBox1.PerformLayout();
		this.groupBox2.ResumeLayout(false);
		this.groupBox2.PerformLayout();
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
